Block 103 of 297
Office Locations
A card for each office with address, phone, email, hours, directions and accessibility notes.
- Puck key
- OfficeLocationsBlock
- Export
- officeLocationsBlock
- React component
- <OfficeLocations />
- Path
- components/puck/office-locations-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 location cards, each with a name, an optional tag, address, tap-to-call phone, email, hours and a directions link. A shaded note on each card can describe parking, entrances and other access details. Cards run three across on desktop, two on tablets and one on phones, and they stretch to equal height.
- Agencies with several service offices or branches
- Library systems or community center networks
- Nonprofits with multiple sites, clinics or pantries
Writing the content
- Add between 1 and 12 Locations. Three or six fill the desktop grid evenly.
- Type Address and Hours one line per row, such as "Mon – Fri: 8 a.m. – 5 p.m.". Every blank field hides its row.
- Use Accessibility notes for specifics people plan around: step-free entrances, elevators, accessible parking, hearing loops or equipment to borrow.
- Tag is a short label above the name, like Main office or Seasonal. Leave it blank on most cards so the ones that need it stand out.
Accessibility
- Each card is an article with the location name as a heading one level below the section heading, so people can jump between locations.
- Contact details are a description list with hidden Address, Phone, Email and Hours terms, and the icons are hidden from assistive tech.
- Each "Get directions" link includes the location name in hidden text, so a list of links still makes sense out of context. Links keep a 44px minimum height.
Customizing the code
- Icons and tags use indigo-600 and indigo-700; change those classes to rebrand.
- The grid is md:grid-cols-2 lg:grid-cols-3; use lg:grid-cols-2 for wider cards.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Introtextarea
- Locationsarray