<hk-variant-picker>
hk-variant-picker: Lets the shopper choose a product's options and variant. Syntax, props, defaults and examples.
On this page
Lets the shopper choose a product's options and variant.
Group: Product. Name in the editor: Variant picker. Complete props for every tag: Tag reference.
Syntax
<hk-variant-picker />Children: None. The tag is self-closing.
Props
Write props as kebab-case attributes.
| Prop | Type | Required | Default | Allowed values | Editor label |
|---|---|---|---|---|---|
product | data | no | - | - | Product |
display | select | no | auto | auto, swatches, buttons, select | Picker style |
Required props
None. Every prop has a default or can be left out.
Examples
From packages/templates-default/theme/blocks/product-variants.snf, lines 1 to 1:
<hk-variant-picker product="{{ product }}" display="{{ block.settings.style }}" />Related tags
hk-price: Formats a price, with an optional compare-at price, for a product or a fixed amount.hk-product-card: A product card for a product, customizable through named parts.hk-product-grid: A grid of product cards for a list of products, with a limit and columns.hk-product-gallery: A product's images as a gallery with thumbnails.
