Block 173 of 297
Camp Finder
Summer and break camps grouped by age, with weeks, hours, prices, extended care, spots left and a financial aid callout.
- Puck key
- CampFinderBlock
- Export
- campFinderBlock
- React component
- <CampFinder />
- Path
- components/puck/camp-finder-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 camp catalog that groups camps by age band, each band with its own heading and a grid of camp cards. Cards show spots status, weeks as small date chips, hours, location, extended care, prices and a register or waitlist button. When there is more than one age band, a row of jump links sits beside the heading. A financial aid callout closes the section.
- A summer day camp page for a park district
- School-break and winter-break camp listings
- A youth programs page organized by grade or age
Writing the content
- Camps group by the exact text in Ages, so "Ages 6–8" and "Ages 6-8" with a different dash make two groups. Groups appear in the order their first camp does.
- Set Spots to Full to swap Register for Join the waitlist. With no Waitlist link, the card says "This camp is full".
- Price is adds a unit like "per week" after the resident price. Up to 40 camps fit, and the aid callout hides when Financial aid heading is blank.
Accessibility
- Each age band is its own section labelled by a heading, with camp names one level lower, so screen reader users can move band by band (WCAG 1.3.1).
- Spots status is written out ("Few spots left", "Full, waitlist only") with an icon and a hidden "Spots:" prefix, so the green, amber and red pills never rely on color (WCAG 1.4.1).
Customizing the code
- Status colors, icons and words are in the spotStyles map; the aid callout uses bg-indigo-950.
- Grouping logic lives in groupByAge; change it to sort bands or group by another field.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Eyebrowtext
- Headingtext
- Heading levelselect
- Introtextarea
- Campsarray
- Financial aid headingtext
- Financial aid texttextarea
- Financial aid link texttext
- Financial aid linktext