Skip to content

Block 70 of 297

Product Grid

Shop items as photo cards with price, sale price and badge, plus an optional one-tap add-to-cart form that posts the SKU.

Puck key
ProductGridBlock
Export
productGridBlock
React component
<ProductGrid />
Path
components/puck/product-grid-block.tsx
Dependencies
None
License
MIT

About this block

When to use it, how to write for it, and what to change in the code.

What it's for

A shop grid of portrait photo cards with a name, price, optional sale price and badge, a one-line note and an optional add-to-cart button. Each card links to its product page, while the add button posts the item's SKU and a quantity of one to your cart. Pick three or four columns for wide screens; tablets show two and phones one.

  • A museum, zoo or park gift shop landing page
  • A featured-products row on a home or membership page
  • A merchandise page for a fundraiser or event
Writing the content
  • Add one to twelve Products. Fill in Original price only during a sale.
  • Each product needs a SKU for Quick add-to-cart; without one, that card has no button.
  • Keep Badge to two or three words and Short note to one line.
  • Image alt text should describe the photo, since the name is already read from the link.
Accessibility
  • Sale prices are read as "Sale price $18.00, was $24.00" through hidden text, so the discount isn't conveyed by strikethrough or color alone (WCAG 1.4.1).
  • Each add button carries the product name in hidden text, like "Add to cart: Mineral Discovery Kit", so repeated buttons stay distinguishable.
  • Product names are headings one level below the section heading, and the product list is labelled by that heading.
Customizing the code
  • Column choices are in the colClass map; the image crop is aspect-4/5.
  • The photo zooms on hover with group-hover:scale-105. Add motion-reduce:group-hover:scale-100 if you want reduced-motion users to skip it.

Editor fields

What content editors see in the P1 sidebar when they select this block.

  • Eyebrowtext
  • Headingtext
  • Heading levelselect
  • Introtextarea
  • Columns on wide screensselect
  • Quick add-to-cartradio
  • Cart URLtext
  • Add button texttext
  • Productsarray
  • View all link texttext
  • View all link URLtext
  • Footnotetext