<hk-product-grid>
hk-product-grid: A grid of product cards for a list of products, with a limit and columns. Syntax, props, defaults and examples.
On this page
A grid of product cards for a list of products, with a limit and columns.
Group: Product. Name in the editor: Product grid. Complete props for every tag: Tag reference.
Syntax
<hk-product-grid />Children: None. The tag is self-closing.
Props
Write props as kebab-case attributes.
| Prop | Type | Required | Default | Allowed values | Editor label |
|---|---|---|---|---|---|
products | collection | no | - | - | Products |
limit | range | no | 8 | 1 to 48 | Count |
columns (responsive) | range | no | 4 | 1 to 6 | Columns |
Responsive props: columns. Each also takes a tablet- and a mobile- prefix.
Required props
None. Every prop has a default or can be left out.
Examples
From docs/examples/example-store/sections/product-grid.snf, lines 10 to 16:
<hk-product-grid
products="{{ collection('featured').products }}"
limit="{{ section.settings.count }}"
columns="4"
tablet-columns="3"
mobile-columns="2"
/>Related tags
hk-product-card: A product card for a product, customizable through named parts.hk-price: Formats a price, with an optional compare-at price, for a product or a fixed amount.hk-product-gallery: A product's images as a gallery with thumbnails.hk-variant-picker: Lets the shopper choose a product's options and variant.
