Skip to content

Block 266 of 297

Milestone Tracker

Project milestones with due dates, written status labels and an overall percent-complete bar.

Puck key
MilestoneTrackerBlock
Export
milestoneTrackerBlock
React component
<MilestoneTracker />
Path
components/puck/milestone-tracker-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 project's milestones on a short vertical timeline, each with a status icon, a written status badge, a due date and an optional note. Above the list, a progress bar shows overall percent complete and a count by status. Choose green, amber and red status colors or brand-only styling. Bound statuses such as complete or overdue are understood.

  • Public updates on a park renovation or capital project
  • Grant deliverables tracked for a funder report
  • Website or software project phases shared with stakeholders
Writing the content
  • Leave Overall % complete blank to calculate it from finished milestones, or bind it, like {{ project.percent_complete }}.
  • Write Due date the way readers expect; it is shown as written. Late items read "Was due" before the date.
  • Use Note for one short reason, especially on late milestones, like "Waiting on utility inspection".
  • Milestones accept up to 16 entries. Bound values like active, overdue or finished map to the four statuses.
Accessibility
  • Every milestone's status is spelled out in a badge, so either color setting works without relying on color (WCAG 1.4.1).
  • The overall bar uses role="progressbar" with min, max, current value and an aria-valuetext such as "50% complete" (WCAG 4.1.2).
  • The progress bar is labeled by the "x of y milestones done" line, and status icons are aria-hidden.
Customizing the code
  • Status colors for both modes are in the TONE map; the progress fill is bg-indigo-600.
  • Add synonyms for bound status values in toStatus().

Editor fields

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

  • Project nametext
  • Heading levelselect
  • Subtitletext
  • Milestonesarray
  • Overall % completetext
  • Status colorsradio
  • Footnotetext