Block 73 of 297
Ticket Selector
Timed-entry admission: visit date, entry-time cards with availability, quantities by ticket type and add-ons in one form.
- Puck key
- TicketSelectorBlock
- Export
- ticketSelectorBlock
- React component
- <TicketSelector />
- Path
- components/puck/ticket-selector-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 timed-entry admission form in numbered steps: visit date, entry-time cards with availability, a quantity box for each ticket type and optional add-ons, all submitted together to your ticketing checkout. Sold-out times stay visible but can't be chosen. The heading column stays in view on desktop; on phones the steps follow the intro and the time cards stack.
- Zoo, museum or garden general admission with timed entry
- A seasonal attraction or light show with capacity per time slot
- Tours or exhibits that sell add-ons such as parking or feedings
Writing the content
- Mark a time Sold out to disable it. The first open time is preselected, so keep times in order.
- The ticket Name becomes the field name (Adult is sent as qty_adult), so keep names stable.
- Earliest date must be YYYY-MM-DD; other formats are ignored.
- Set Send with to match your checkout: GET for URL parameters, POST for a form body.
Accessibility
- Entry times are native radios; sold-out times are disabled, struck through and labelled in text (WCAG 1.4.1).
- Each quantity box is labelled by its ticket name, price and audience, with the per-type limit hint linked by aria-describedby.
- Step numbers are hidden, and the selected time card gets a thicker ring and focus outline.
Customizing the code
- The fieldKey function builds qty_ and add-on field names from the editor text; change it if your checkout expects IDs.
- Time cards run three across from sm:grid-cols-3; the selected style is has-checked:ring-indigo-600.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Eyebrowtext
- Headingtext
- Heading levelselect
- Introtextarea
- Checkout URLtext
- Send withradio
- Earliest datetext
- Entry timesarray
- Ticket typesarray
- Most tickets per typetext
- Add-onsarray
- Button texttext
- Policy notetextarea