Skip to content
Hekana Spray
Documentation
Getting started
Theme development
Components and tags

Localization

Apps and custom code

Examples and recipes
API reference
Publishing
Build apps
AI development

<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

html
<hk-variant-picker />

Children: None. The tag is self-closing.

Props

Write props as kebab-case attributes.

PropTypeRequiredDefaultAllowed valuesEditor label
productdatano--Product
displayselectnoautoauto, swatches, buttons, selectPicker 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:

html
<hk-variant-picker product="{{ product }}" display="{{ block.settings.style }}" />
  • 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.

Next steps