Block 130 of 297
Volunteer Roles
Volunteer opportunities with time commitment, location, skill tags, spots left and an apply link.
- Puck key
- VolunteerRolesBlock
- Export
- volunteerRolesBlock
- React component
- <VolunteerRoles />
- Path
- components/puck/volunteer-roles-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
Cards for open volunteer roles, each with a title, summary, time commitment, in-person, remote or hybrid setting, location, skill tags, a spots-left badge and its own apply button. Cards run two across from tablet width and stack on phones. A footer line can point people who see no fit toward a general interest form.
- A volunteer page listing current openings
- A recruiting push for a specific event or season
- A skills-based volunteering page for professionals who want to give time
Writing the content
- State Time commitment in concrete terms, like 3 hrs/week or One Saturday a month.
- Set Where for each role, and leave Location blank for remote roles so the card just reads Remote.
- Write Skills one per line; each becomes a tag. Spots left is free text, such as 4 spots left or Ongoing, and hides when blank.
- The block takes 1 to 12 roles. Apply link text is shared by every card and defaults to Apply.
Accessibility
- Each role is an article with its title as a heading one level below the block heading.
- Commitment and setting are a description list with hidden labels, so the clock and pin icons are not the only cue (WCAG 1.3.1).
- Every apply button adds the role title for screen readers, such as "Apply: Tutor", and has a focus outline and a 44px minimum height.
Customizing the code
- Apply buttons are bg-neutral-950 with an indigo hover, and the spots badge is indigo; swap indigo- to rebrand.
- Change md:grid-cols-2 on the role list for three across, such as lg:grid-cols-3.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Headingtextarea
- Heading levelselect
- Introtextarea
- Rolesarray
- Apply link texttext
- Footer texttext
- Footer link texttext
- Footer linktext