Block 206 of 297
Branch Services
Library branches with address and hours, plus a services table with check marks that scrolls accessibly on phones.
- Puck key
- BranchServicesBlock
- Export
- branchServicesBlock
- React component
- <BranchServices />
- Path
- components/puck/branch-services-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 table of library branches, each row showing name, address, hours and phone, followed by up to six service columns marked with check marks or dashes. It answers "which branch has a makerspace or passport desk" at a glance. The table scrolls sideways on narrow screens, and from small tablets up the branch column stays pinned while you scroll.
- A "Locations" page for a multi-branch library system
- A services page showing where to find specialty equipment
- A comparison of hours and amenities across branches
Writing the content
- Name up to six services in Service 1 through Service 6. A blank service field drops that column, along with its Offers service radio for every branch.
- Branches takes 1 to 12 rows. Keep Hours summary on one line, like "Mon–Thu 9–8 · Fri–Sat 9–5 · Sun 1–5".
- Use Footnote for conditions like appointment-only services, rather than squeezing them into the column names.
Accessibility
- It is a real table with column headers and a row header for each branch, and the caption names the table for screen readers (WCAG 1.3.1).
- Each cell carries hidden text such as "Yes, Wi-Fi available" or "No Notary", so availability is not shown by the check mark or color alone (WCAG 1.1.1, 1.4.1).
- The scrolling region is focusable and labeled by the caption, so keyboard users can scroll it, and it shows a focus outline (WCAG 2.1.1, 2.4.7).
Customizing the code
- Service columns are fixed at six (s1 to s6). Adding a seventh means a new service7 field, an s7 key on Branch, and an entry in the services array in render.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtext
- Heading levelselect
- Introtextarea
- Table captiontext
- Service 1text
- Service 2text
- Service 3text
- Service 4text
- Service 5text
- Service 6text
- Branchesarray
- Footnotetextarea