Block 147 of 297
Volunteer Shifts
Upcoming volunteer shift schedule with date, time, site, role, spots left and sign-up links, plus a group note.
- Puck key
- VolunteerShiftsBlock
- Export
- volunteerShiftsBlock
- React component
- <VolunteerShifts />
- Path
- components/puck/volunteer-shifts-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
An upcoming shift schedule with date, time, role, site and spots left, plus a sign-up button for each shift. Wider screens get a real table; phones get stacked cards with a date tile and a full-width button. Full shifts are marked and lose their link, and shifts nearly full can be flagged. A note for group volunteering closes the section.
- A food bank or warehouse volunteer calendar
- An event volunteer page with several shifts per day
- A seasonal drive or build day sign-up page
Writing the content
- Enter each Date as YYYY-MM-DD so the weekday shows. Shifts are not sorted, so list them in order and remove past ones.
- Spots left should be a number; 0 marks the shift full and replaces the button with the Full shift text.
- Set Few-spots threshold, such as 3, to tag shifts at or below that number as "filling". Leave it blank to turn this off.
- Write a Table caption like "Upcoming shifts, October"; it shows above the table and the cards.
Accessibility
- Wider screens get a table with column headers and the date as a row header; phone cards are a list labelled by the caption, with hidden terms for time, site and spots (WCAG 1.3.1).
- Sign-up links add the role and full date for screen readers, and full shifts add "no spots left" as hidden text (WCAG 2.4.4).
- Full and filling status are written words, not only gray text or a colored dot (WCAG 1.4.1).
Customizing the code
- Sign-up buttons, weekday labels and the filling highlight use Tailwind indigo; change indigo- to rebrand.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtextarea
- Heading levelselect
- Introtextarea
- Table captiontext
- Shiftsarray
- Sign-up link texttext
- Full shift texttext
- Few-spots thresholdtext
- Group note headingtext
- Group note texttextarea
- Group link texttext
- Group linktext