Funnel
How many make it through each step, as one shape that narrows like a funnel. Each step sits flat at its true size, with its share and the drop beside it, and can split into bands like mobile and desktop.
- Visited store: 100,000
- Viewed product: 61,200, 61% of start, 38,800 dropped
- Added to cart: 16,400, 16% of start, 44,800 dropped, Biggest drop
- Started checkout: 8,400, 8.4% of start, 8,000 dropped
- Purchased: 3,600, 3.6% of start, 4,800 dropped
Installation
npx shadcn@latest add @quireui/funnelUsage
<Funnel
label="Checkout funnel"
steps={[
{ label: "Visited store", value: 100000 },
{ label: "Viewed product", value: 61200 },
{ label: "Added to cart", value: 16400 },
{ label: "Started checkout", value: 8400 },
{ label: "Purchased", value: 3600 },
]}
/>Each step is a flat stretch of the funnel exactly as thick as its count, compared with the first step, and eases into the next with a short curve. Over each step are its name, its count and its share of the start; under the gaps between steps, the share that dropped there. The largest drop is set in a stronger ink and named for screen readers.
The flat stretches are what keep it honest: a funnel drawn as a cone of slanted shapes makes the areas disagree with the numbers, and hides or exaggerates where people leave.
Split into parts
parts splits every step into bands, like devices or plans, stacked through the funnel and kept apart by a hairline of the surface. Give each step its parts by key; they add up to its value. The tooltip and screen readers give every part's count. Choose a part in the legend and the funnel shows it alone, with its own counts and rates; choose it again for the whole.
- Visited store: 100,000, Mobile 62,000, Desktop 38,000
- Viewed product: 61,200, 61% of start, 38,800 dropped, Mobile 36,400, Desktop 24,800
- Added to cart: 16,400, 16% of start, 44,800 dropped, Mobile 8,600, Desktop 7,800, Biggest drop
- Started checkout: 8,400, 8.4% of start, 8,000 dropped, Mobile 3,900, Desktop 4,500
- Purchased: 3,600, 3.6% of start, 4,800 dropped, Mobile 1,500, Desktop 2,100
<Funnel
label="Checkout funnel by device"
parts={[
{ key: "mobile", label: "Mobile" },
{ key: "desktop", label: "Desktop" },
]}
steps={[
{ label: "Visited store", value: 100000, parts: { mobile: 62000, desktop: 38000 } },
// ...
]}
/>Against the period before
Give each step its previous count and every step says how its conversion moved since then, in percentage points: "16% of start ↗ 2.3 pt". Points, not percent, because a rate going from 3.1% to 3.6% is half a point, which is what anyone means, not "16% better". The earlier funnel is drawn as a dashed outline behind, so you can see where it narrows differently. No other funnel component we know of does this.
detail adds a line of your own under a step and in its tooltip, like how long people took to get there.
- Visited store: 100,000
- Viewed product: 61,200, 61% of start, 38,800 dropped, Up 2.3 pt
- Added to cart: 16,400, 16% of start, 44,800 dropped, Up 2.3 pt, Biggest drop
- Started checkout: 8,400, 8.4% of start, 8,000 dropped, Up 0.8 pt
- Purchased: 3,600, 3.6% of start, 4,800 dropped, Up 0.5 pt
<Funnel
label="Checkout funnel, vs last month"
steps={[
{ label: "Visited store", value: 100000, previous: 100000 },
{ label: "Viewed product", value: 61200, previous: 58900, detail: "median 1m 40s" },
// ...
]}
/>Choosing a step
onPick is called with a step's label when it is clicked or chosen with Enter, so your app can open who dropped off before it. active and onActiveChange share the step being read with anything beside the funnel, like a table whose row lights up with it, and whose rows light up the funnel in turn.
- Visited store: 100,000
- Viewed product: 61,200, 61% of start, 38,800 dropped
- Added to cart: 16,400, 16% of start, 44,800 dropped, Biggest drop
- Started checkout: 8,400, 8.4% of start, 8,000 dropped
- Purchased: 3,600, 3.6% of start, 4,800 dropped
Click a step, or press Enter on one, to list who dropped off before it.
Top to bottom
orientation="vertical" runs the funnel down the page, with names on the left and counts on the right. By default, auto, a funnel turns vertical by itself when its own space is narrower than 576 pixels, so it fits a card or a phone.
- Visitors: 24,000
- Signed up: 15,600, 65% of previous, 8,400 dropped
- Activated: 10,800, 69% of previous, 4,800 dropped
- Started trial: 7,200, 67% of previous, 3,600 dropped
- Subscribed: 4,320, 60% of previous, 2,880 dropped, Biggest drop
- Visitors: 24,000
- Signed up: 15,600, 65% of start, 8,400 dropped
- Activated: 10,800, 45% of start, 4,800 dropped
- Started trial: 7,200, 30% of start, 3,600 dropped
- Subscribed: 4,320, 18% of start, 2,880 dropped, Biggest drop
Of the start, or of the step before
basis="previous" shows each step's share of the one before it, which answers "which step loses the most", rather than of the start, which answers "how many end up buying".
Loading and empty
Accessibility
The shape is a slider over the steps: screen readers hear the funnel's name, then each step as you move, like "Added to cart: 16,400, 16% of start, 44,800 dropped, Mobile 8,600, Desktop 7,800". With previous, each step adds how its conversion moved, like "Up 2.3 pt". The same numbers are an ordered list read with it, and the legend's parts are toggle buttons that say whether one is shown alone. Every count is written out beside the shape, so nothing is told by its size or colour alone.
| Key | Action |
|---|---|
| ← / →, ↑ / ↓ | Previous or next step |
| Home / End | First or last step |
| Enter | With onPick: chooses the step |
| Esc | Leaves the step |
Motion
Small. The funnel arrives once, growing in from a touch smaller, when it first scrolls into view, and its shape glides when new numbers arrive; the counts' changed digits slide in the way they moved. The step under the pointer stays clear while the rest ease back, and the tooltip fades in. From the keyboard nothing waits, and with reduced motion only the fades remain. animate={false} turns the arrival, the gliding and the digits off.
Funnel or something else?
API reference
Funnel
How many make it through each step, drawn as one shape that narrows like a funnel. Each step is flat at its true thickness and eases into the next, with its count and share beside it and the drop between steps. parts splits it into bands, like mobile and desktop.
Prop
Type
Also takes every <figure> attribute. Style it with [data-slot="funnel"].
Trackernew
A row of bars, one per period, in its status's colour, like uptime per day. Works out the uptime, fits the space, reads incidents out, and stacked trackers share one cursor. No chart library.
Cohort gridpro
Retention by cohort, with a linked retention curve, each period's trend in its heading, shading against the average, and full keyboard reading.