Block 233 of 297
Things to Do
Magazine-spread photo tiles for activity categories, each with a place count and a link into the listings.
- Puck key
- ThingsToDoBlock
- Export
- thingsToDoBlock
- React component
- <ThingsToDo />
- Path
- components/puck/things-to-do-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 magazine-style spread of category tiles for a destination home page: a large lead photo spanning two rows, two tiles stacked beside it, then a row of three. Each tile is a full-bleed photo with the category name, an optional place count and a link to its listings. Phones show one tile per row and hide the smaller tiles' blurbs.
- The "Explore" section of a tourism or convention bureau home page
- A downtown association pointing visitors to dining, shopping and nightlife listings
- A parks system grouping trails, water access and programs by interest
Writing the content
- Six categories fill the spread exactly. The block accepts up to nine, and items seven through nine restart the layout pattern.
- Put your strongest photo first; the first tile is the large one and the only one that shows its Blurb on phones.
- Text sits over the bottom of each photo on a dark gradient, so choose images with calm lower thirds.
Accessibility
- Category names are headings one level below the Heading level setting, so the tiles appear in a screen reader's heading list (WCAG 1.3.1).
- Each tile is a single link with a visible focus outline offset from the rounded corner, and the arrow badge is aria-hidden.
- The hover zoom on photos is turned off for visitors who set reduced motion.
Customizing the code
- Tile spans and heights live in the SPREAD array at the top of the file; edit it to change the layout pattern.
- Swap indigo- classes to recolor the eyebrow rule, see-all link and focus outlines.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Eyebrowtext
- Headingtext
- Heading levelselect
- Introtextarea
- See-all link texttext
- See-all linktext
- Categoriesarray