Skip to content

Block 249 of 297

Funnel Chart

A conversion funnel with counts, share of the first stage, step conversion and the biggest drop-off called out.

Puck key
FunnelChartBlock
Export
funnelChartBlock
React component
<FunnelChart />
Path
components/puck/funnel-chart-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 conversion funnel drawn as centered bars that narrow from stage to stage. Each stage prints its count and share of the first stage, and between stages a line shows what percentage continued. With three or more stages, the steepest step can be flagged in amber with a sentence naming where people dropped off. Counts accept {{ item.field }} bindings.

  • An application or enrollment pipeline from first visit to award
  • Donation page visits through completed gifts
  • Program intake, from referral to graduation
Writing the content
  • List Stages from first to last; percentages are calculated from the order you enter. The block accepts up to ten.
  • Enter Count as a number, like 4,960, or bind it to your data source.
  • Turn off Call out biggest drop-off if some decline is expected and the warning would mislead.
  • Use stage names that describe an action, like "Submitted", so the drop-off sentence reads naturally.
Accessibility
  • All values are printed as text and the bars are aria-hidden, so the funnel reads fully without the graphic.
  • The biggest drop-off is labeled in words, both as a badge and as a sentence, not only by its amber outline (WCAG 1.4.1).
  • Stages are an ordered list labeled by the card title, and the title level is an editor setting.
Customizing the code
  • Bar shades step through the SHADES array, from bg-indigo-600 down to bg-indigo-200.
  • The drop-off highlight uses amber-; change it to match your warning color.

Editor fields

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

  • Titletext
  • Heading levelselect
  • Period or subtitletext
  • Stagesarray
  • Call out biggest drop-offradio
  • Footnotetext