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
- Visited12,400100% of the start
- Read the docs5,30042.7% of the step before
- Installed1,87035.3% of the step before
- Shipped42022.5% of the step before
stagesrun 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.
formatwrites a value, for example withtoLocaleString.labelsreplaces the English rate words.coloris 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
| Name | Type | Default | Description |
|---|---|---|---|
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()` |
color | string | "chart-1" | a token name (`chart-2`, `success`…) or any CSS color |
label | string | "Funnel" | names the funnel for screen readers |
labels | Partial<{ ofPrev: (n: string) => string; ofFirst: (n: string) => string; }> | — | words for the rates: `ofPrev(n)` and `ofFirst(n)` |