Quire UI
Charts10

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
Viewed product
Added to cart
Started checkout
Purchased
100KStart
61.2K61% · ↓ 39%
16.4K16% · ↓ 73%
8.4K8.4% · ↓ 49%
3.6K3.6% · ↓ 57%
  1. Visited store: 100,000
  2. Viewed product: 61,200, 61% of start, 38,800 dropped
  3. Added to cart: 16,400, 16% of start, 44,800 dropped, Biggest drop
  4. Started checkout: 8,400, 8.4% of start, 8,000 dropped
  5. Purchased: 3,600, 3.6% of start, 4,800 dropped

Installation

npx shadcn@latest add @quireui/funnel

Usage

<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
Viewed product
Added to cart
Started checkout
Purchased
100KStart
61.2K61% · ↓ 39%
16.4K16% · ↓ 73%
8.4K8.4% · ↓ 49%
3.6K3.6% · ↓ 57%
  1. Visited store: 100,000, Mobile 62,000, Desktop 38,000
  2. Viewed product: 61,200, 61% of start, 38,800 dropped, Mobile 36,400, Desktop 24,800
  3. Added to cart: 16,400, 16% of start, 44,800 dropped, Mobile 8,600, Desktop 7,800, Biggest drop
  4. Started checkout: 8,400, 8.4% of start, 8,000 dropped, Mobile 3,900, Desktop 4,500
  5. 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
Viewed productmedian 1m 40s
Added to cartmedian 6m
Started checkoutmedian 2h 10m
Purchasedmedian 2d 4h
100KStart
61.2K61% · ↓ 39%Up2.3 pt
16.4K16% · ↓ 73%Up2.3 pt
8.4K8.4% · ↓ 49%Up0.8 pt
3.6K3.6% · ↓ 57%Up0.5 pt
  1. Visited store: 100,000
  2. Viewed product: 61,200, 61% of start, 38,800 dropped, Up 2.3 pt
  3. Added to cart: 16,400, 16% of start, 44,800 dropped, Up 2.3 pt, Biggest drop
  4. Started checkout: 8,400, 8.4% of start, 8,000 dropped, Up 0.8 pt
  5. 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
Viewed product
Added to cart
Started checkout
Purchased
100KStart
61.2K61% · ↓ 39%
16.4K16% · ↓ 73%
8.4K8.4% · ↓ 49%
3.6K3.6% · ↓ 57%
  1. Visited store: 100,000
  2. Viewed product: 61,200, 61% of start, 38,800 dropped
  3. Added to cart: 16,400, 16% of start, 44,800 dropped, Biggest drop
  4. Started checkout: 8,400, 8.4% of start, 8,000 dropped
  5. 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
Signed up
Activated
Started trial
Subscribed
24KStart
15.6K65% · ↓ 35%
10.8K69% · ↓ 31%
7.2K67% · ↓ 33%
4.3K60% · ↓ 40%
  1. Visitors: 24,000
  2. Signed up: 15,600, 65% of previous, 8,400 dropped
  3. Activated: 10,800, 69% of previous, 4,800 dropped
  4. Started trial: 7,200, 67% of previous, 3,600 dropped
  5. Subscribed: 4,320, 60% of previous, 2,880 dropped, Biggest drop
Visitors
Signed up
Activated
Started trial
Subscribed
24KStart
15.6K65% · ↓ 35%
10.8K45% · ↓ 31%
7.2K30% · ↓ 33%
4.3K18% · ↓ 40%
  1. Visitors: 24,000
  2. Signed up: 15,600, 65% of start, 8,400 dropped
  3. Activated: 10,800, 45% of start, 4,800 dropped
  4. Started trial: 7,200, 30% of start, 3,600 dropped
  5. 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

No data

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.

KeyAction
← / →, ↑ / ↓Previous or next step
Home / EndFirst or last step
EnterWith onPick: chooses the step
EscLeaves 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?

  • Shares of one total that are not steps: a Meter stack.
  • Counts that are not a sequence: a Bar list.

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"].

On this page