Block 264 of 297
Radial Progress
One to four ring gauges side by side, each showing progress toward its target.
- Puck key
- RadialProgressBlock
- Export
- radialProgressBlock
- React component
- <RadialProgress />
- Path
- components/puck/radial-progress-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
One to four ring gauges in a row, each filling to its current value divided by its target, with the percentage in the center and the amount underneath. A ring that reaches its target shows "Goal met" with a check. Rings wrap to two across or stack in narrow cards. Values accept {{ source.field }} bindings, like {{ campaign.raised }}.
- Year-end campaign goals: dollars, new donors, sustainers
- Enrollment or registration targets for several programs
- Volunteer recruitment goals by site
Writing the content
- Give every ring a Target; without one the center shows a dash and the ring stays empty.
- Keep Label short, since it sits centered under a small ring.
- Use Prefix and Suffix per ring, like $ for dollars and nothing for donor counts.
- Rings cap at 100% visually, but the percentage keeps counting past it, so an over-goal ring reads 106%.
Accessibility
- Each ring has role="img" with a label giving the percentage of target, the amount and "goal met" when reached.
- "Goal met" is written with a check icon rather than shown only by a darker ring (WCAG 1.4.1).
- The title level is an editor setting, and the label and amount under each ring are plain visible text.
Customizing the code
- Ring colors are stroke-indigo-600, and stroke-indigo-700 once a goal is met; the track is stroke-neutral-100.
- The GRID map sets how rings wrap at each container width.
Editor fields
What content editors see in the P1 sidebar when they select this block.
- Titletext
- Heading levelselect
- Subtitle or periodtext
- Ringsarray
- Footnotetext