Skip to content

Block 71 of 297

Product Detail

Photo gallery, price, option pills as radio groups, quantity and an add-to-cart form, with expandable care and returns details.

Puck key
ProductDetailBlock
Export
productDetailBlock
React component
<ProductDetail />
Path
components/puck/product-detail-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 single product layout: a photo column on the left, and on the right the category line, name, price, rating line, description, option pills, quantity and add-to-cart button, followed by expandable details such as care and returns. On desktop all photos stack and the buy column stays in view. On phones only the first photo shows large, with the rest as a thumbnail row.

  • An individual gift shop or merchandise product page
  • A featured item on a campaign page with sizes or colors
  • A ticketed add-on or membership item that needs option choices
Writing the content
  • Use Heading level H1 when this block is the product's own page.
  • Add up to three Options groups with one choice per line. The first choice is preselected, and the group name becomes the field name.
  • Add one to five Photos with alt text for each view. On phones, thumbnails link to the full image file.
  • Keep the Rating line honest, with a source or sample-data note.
Accessibility
  • Details use native details and summary elements, so they open and close with the keyboard without any script (WCAG 2.1.1).
  • Each option group is a fieldset with a legend; selected pills change fill as well as color, and hidden "Sale price" and "was" text reads the discount aloud.
  • The stock note is linked to the add button with aria-describedby, and the quantity field has a visible label.
Customizing the code
  • Main photos are aspect-square; change it on the img classes for portrait products.
  • The member note callout is bg-indigo-50 text-indigo-900, and the details toggle icon rotates with group-open:rotate-45.

Editor fields

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

  • Category linetext
  • Product nametext
  • Heading levelselect
  • Pricetext
  • Original pricetext
  • Rating linetext
  • Descriptiontextarea
  • Photosarray
  • Optionsarray
  • Cart URLtext
  • SKUtext
  • Maximum quantitytext
  • Button texttext
  • Stock notetext
  • Member notetext
  • Detailsarray