<hk-cart-drawer>
hk-cart-drawer: A slide-in cart panel that can open when an item is added. Syntax, props, defaults and examples.
On this page
A slide-in cart panel that can open when an item is added.
Group: Cart and checkout. Name in the editor: Cart drawer. Complete props for every tag: Tag reference.
Syntax
<hk-cart-drawer>
…
</hk-cart-drawer>Children: Any content: elements, hk-* tags and text.
Props
Write props as kebab-case attributes.
| Prop | Type | Required | Default | Allowed values | Editor label |
|---|---|---|---|---|---|
title | text | no | - | - | Drawer title |
open-on-add | boolean | no | true | - | Open when an item is added |
Required props
None. Every prop has a default or can be left out.
Examples
From packages/templates-default/theme/sections/header.snf, lines 66 to 69:
<hk-cart-drawer open-on-add="{{ section.settings.drawer_on_add }}">
<hk-cart-items />
<hk-cart-summary />
</hk-cart-drawer>Related tags
hk-cart-items: Lists the cart's lines, customizable through named parts.hk-cart-summary: The cart subtotal and the checkout button.hk-add-to-cart: The add to cart button for a product, with quantity and sold-out states.hk-cart-count: Shows the number of items in the cart.hk-inline-checkout: Embeds Hekana's checkout for one product inside the page.
