Block 175 of 297
Rec Center Passes
Pass prices by type and age group in a resident and non-resident fee table, with what's included and discounts.
- Puck key
- RecCenterPassesBlock
- Export
- recCenterPassesBlock
- React component
- <RecCenterPasses />
- Path
- components/puck/rec-center-passes-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 fee table for recreation center passes, with pass types as rows and up to four age categories as columns, each split into resident and non-resident prices. The pass column stays pinned while the prices scroll sideways on smaller screens, with a hint above the table. Below it, an included-features list, discounts and a buy panel sit side by side on large screens.
- A rec center membership and pricing page
- An aquatic or fitness center daily and annual pass page
- A fee schedule page that compares resident and non-resident rates
Writing the content
- Clear any of Youth column, Adult column, Senior column or Family column to drop that category from the table entirely.
- Leave a price blank if a pass is not offered for that group; it shows a dash and reads "Not offered".
- Use Fee notes for residency proof, free ages and household rules. Enter Included one item per line.
- Up to eight pass types and six discounts fit. The buy panel appears only when Buy heading has text.
Accessibility
- Category headers span their resident and non-resident columns, and every price cell names its row and column headers with the headers attribute, so screen readers announce combinations like "Annual, Senior, Resident" (WCAG 1.3.1).
- The scrollable table is a focusable region named by a hidden caption (WCAG 2.1.1).
Customizing the code
- The four age categories are defined in the categories constant and the Pass type; adding one means a new label field and two price fields.
- The header row is bg-neutral-950 and row hover is bg-indigo-50; min-w-3xl on the table sets when scrolling starts.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Eyebrowtext
- Headingtext
- Heading levelselect
- Introtextarea
- Youth columntext
- Adult columntext
- Senior columntext
- Family columntext
- Pass typesarray
- Fee notestextarea
- Included headingtext
- Includedtextarea
- Discounts headingtext
- Discountsarray
- Buy headingtext
- Buy texttextarea
- Buy button texttext
- Buy button linktext