Skip to content
Calm motion: animations on this site only fade, with no movement

Funnel ​

Stages with the share that is left at each step

The steps that people take toward a goal, and how many are left at each step. Use it for a sign-up, a checkout, or an adoption path. For parts of one whole, use Treemap. For a flow with branches, see the Sankey demo on the Chart page.

Basic
  1. Visited12,400100% of the start
  2. Read the docs5,30042.7% of the step before
  3. Installed1,87035.3% of the step before
  4. Shipped42022.5% of the step before
  • stages run from the widest to the narrowest. Each bar is as wide as the stage compared with the first stage. A very small stage keeps a bar of at least 2%, so you can see it.
  • Each row also says the rates as text: the share of the first stage, and the share of the stage before. A screen reader hears the same numbers as the picture shows.
  • format writes a value, for example with toLocaleString. labels replaces the English rate words. color is a token name or any CSS color.
  • The funnel is an ordered list named by label.

Usage ​

ts
import { BlessFunnel } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
stages*BlessFunnelStage[]—the stages from widest to narrowest, for example visits, sign-ups, purchases
format((v: number) => string)—text for one value, for example `(v) => v.toLocaleString()`
colorstring"chart-1"a token name (`chart-2`, `success`…) or any CSS color
labelstring"Funnel"names the funnel for screen readers
labelsPartial<{ ofPrev: (n: string) => string; ofFirst: (n: string) => string; }>—words for the rates: `ofPrev(n)` and `ofFirst(n)`

Released under the MIT License. Character names and artwork belong to their owners.