Skip to content

Block 139 of 297

Program Cards

Photo cards for each program showing who it serves, one sourced outcome figure and a link to learn more.

Puck key
ProgramCardsBlock
Export
programCardsBlock
React component
<ProgramCards />
Path
components/puck/program-cards-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

Photo cards for an organization's programs, each naming who it serves, describing it briefly and optionally showing one outcome figure. The audience appears as a pill over the photo, and the whole card links to the program page. Cards run three across on desktop once there are three or more, two on tablets and one on phones.

  • An Our programs overview page
  • A home page section that routes visitors to program pages
  • A funder-facing page showing results by program
Writing the content
  • Write Who it serves as a specific group, like Middle school students, grades 6–8. Set Audience label once, such as Serves, to prefix every card.
  • Use Outcome figure and Outcome label together. The Source line, which should say where figures come from, only shows when a card has a figure.
  • Choose landscape photos; they crop to 16:10. Without an Image URL the audience moves into the card text.
Accessibility
  • Program names are headings one level below the block heading, with the link on the name stretched over the card: one tab stop per program.
  • The visible Card link text is hidden from screen readers, so each link is announced by the program name instead of a repeated "Learn more" (WCAG 2.4.4).
  • Images use the editor's alt text, or empty alt when blank. The hover zoom ignores reduced-motion settings.
Customizing the code
  • Outcome figures and hover rings use Tailwind indigo; replace indigo- to rebrand.
  • Change aspect-16/10 for a different photo crop, or the cols value in render for a different desktop column count.

Editor fields

What content editors see in the P1 sidebar when they select this block.

  • Eyebrowtext
  • Headingtextarea
  • Heading levelselect
  • Introtextarea
  • Programsarray
  • Audience labeltext
  • Card link texttext
  • Source linetext