# Funnel chart

> Conversion funnel with overall and step-to-step rates.

Component · Pro · https://lodeui.com/components/funnel-chart

## When to use

- Conversion through ordered steps: visit → sign up → pay.

## When not to use

- Unordered categories: use a bar chart.

## Installation

```bash
npx shadcn@latest add @lode/funnel-chart
```

Pro: needs a Lode API key and the `@lode` registry in components.json. See https://lodeui.com/docs/cli.

npm dependencies: motion

## Usage

```tsx title="example.tsx"
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.

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

## Related

- [Bar chart](https://lodeui.com/components/bar-chart) — Bars that grow in and morph between datasets, with a hover readout.
- [KPI card](https://lodeui.com/components/kpi-card) — A metric with delta, hint and an optional sparkline.
