Funnel chartPro
Conversion funnel with overall and step-to-step rates.
pnpm dlx shadcn@latest add @lode/funnel-chartSignup funnel
Last 30 days · 3.1% of visitors paid
Visited
48.2k
100.0%
Signed up
14.1k
29.3%↓ 71% left
Activated
8.5k
17.6%↓ 40% left
Invited team
3.2k
6.7%↓ 62% left
Paid
1.5k
3.1%↓ 54% left
When to use
- Conversion through ordered steps: visit → sign up → pay.
When not to use
- Unordered categories: use a bar chart.
Installation
pnpm dlx shadcn@latest add @lode/funnel-chartPro components need an API key and the registry in components.json. See CLI and API keys.
1Install the dependencies
npm install motion2Copy the source into your project
Usage
Import it from @/components/ui/funnel-chart after installing.
import { FunnelChart } from "@/components/ui/funnel-chart";
export function Signup() {
return <FunnelChart variant="flow" steps={[{ label: "Visited", value: 12000 }, { label: "Signed up", value: 1800 }, { label: "Paid", value: 240 }]} />;
}API reference
FunnelChart
Steps with step-to-step drop-off, as bars or a flowing band.
steps
{ label; value }[]
Steps in order.
variant= "bars"
"bars" | "flow"
flow draws a tapered band with people flowing through and dropping out at each step.
color= var(--chart-1)
string
Bar or band colour.
format
(n) => string
Formats values.
height= 180
number
flow only: band height in px.
| Prop | Type | Default | Description |
|---|---|---|---|
| steps | { label; value }[] | – | Steps in order. |
| variant | "bars" | "flow" | "bars" | flow draws a tapered band with people flowing through and dropping out at each step. |
| color | string | var(--chart-1) | Bar or band colour. |
| format | (n) => string | – | Formats values. |
| height | number | 180 | flow only: band height in px. |
Keyboard interactions
| Keys | Action |
|---|---|
| Tab | flow: move between steps; the focused step is highlighted |
Accessibility
- Every step prints its value and conversion as text.
- flow: each step is focusable with its value, share of the first step and conversion from the previous one.
Motion
- Bars grow in sequence.
- flow: the band draws in, dots travel along it and fall away where people drop off. Off for reduced motion and paused off screen.
Responsive behavior
- Labels stack above bars on phones.
- flow falls back to bars below 480px wide.
Performance
- Static after mount.
Notes for AI
- Values should decrease; the chart doesn't sort.
This page as Markdown, for assistants and coding agents:
/components/funnel-chart/markdownThe full library index for assistants is at /llms.txt.
Related
Lode·229 doc pages·llms.txt