Block 160 of 297
Parks Directory
Park cards with photos, labeled amenity icons, hours, address and a directions link.
- Puck key
- ParksDirectoryBlock
- Export
- parksDirectoryBlock
- React component
- <ParksDirectory />
- Path
- components/puck/parks-directory-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 grid of park cards with a 3:2 photo, name, one-line description, amenity tags with icons, hours, address and a directions link. Cards sit one per row on phones, two on tablets and three on wide screens. Choose it for a parks overview page where visitors are picking a park by what it offers and where it is.
- A park district's "Find a park" page
- A neighborhood page listing the parks within walking distance
- A tourism page highlighting a short list of featured parks
Writing the content
- Pick amenities from the list (up to nine per park) rather than typing them; the fixed list keeps icons and wording consistent across cards.
- Keep Short description to one sentence. A park with no Image URL gets a plain card with an indigo top rule instead of a photo.
- Fill in Image description for every photo; describe what the picture shows, such as a paved river path.
- Directions link and Park page link both hide when blank. The block holds up to 24 parks.
Accessibility
- Each amenity shows its icon next to a written label, and the icons are hidden from screen readers, so amenities never rely on the picture alone (WCAG 1.1.1).
- Hours and address are a description list, and the "Get directions" link appends the park name for screen readers (WCAG 2.4.4).
Customizing the code
- Add or change amenities in the amenities record at the top of the file; each entry needs a label and a 24px stroke icon path.
- Change aspect-3/2 on the image for a different crop, or sm:grid-cols-2 lg:grid-cols-3 on the list for different columns.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Introtextarea
- Parksarray
- All parks link texttext
- All parks linktext