The steps people or leads go through, first to last, with how many reached each one, the share of the first or of the step before, the count lost and the largest drop marked.
On this page
Used for
- Signup funnel
- Sales pipeline steps
- Checkout drop-off
- Onboarding completion
Examples
Installation
npx knowns-ui@latest add funnel-chartFor Claude Code, Cursor or Codex: installs it and wires the props to your own data.
Paste this into your coding agent (Claude Code, Cursor, Codex). It checks your project, sets up the registry, runs the install and verifies it.
Install prompt
Install Funnel chart from Knowns UI into this project. Work step by step, show me each change, and ask before you edit files outside this project.
Context: Knowns UI (https://ui.knowns.dev) is a shadcn registry. Items land in the project as source files. Docs: https://ui.knowns.dev/docs/funnel-chart
1. Check the project first. Stop and tell me if any of these is missing:
- React 19 and Tailwind CSS v4.
- A components.json at the project root. If there is none, ask me before running `npx knowns-ui@latest init --no-key` (it runs shadcn init when needed, then adds the registries).
2. Run:
```bash
npx knowns-ui@latest add funnel-chart
```
It writes these files:
- lib/knowns/run.ts
- lib/knowns/json.tsx
- lib/knowns/status.ts
- lib/knowns/tone.ts
- lib/knowns/types.ts
- lib/knowns/use-abortable.ts
- lib/knowns/utils.ts
- lib/knowns/motion.tsx
- lib/knowns/motion-utils.ts
- components/ui/knowns/use-floating.ts
- components/ui/knowns/tooltip.tsx
- components/ui/knowns/tooltip-utils.ts
- components/ui/knowns/badge.tsx
- components/ui/knowns/progress.tsx
- components/ui/knowns/blocks/analytics/funnel-chart.tsx
- components/ui/knowns/blocks/analytics/funnel-chart-utils.ts
and installs these npm packages: clsx@^2.1.1, tailwind-merge@^3.7.0, class-variance-authority@^0.7.1.
3. While it runs:
- It also adds a few @keyframes (all named kn-*) to the global CSS file (globals.css or the file components.json points at). Let it: they only add animations.
- If it asks to overwrite files under lib/knowns/: these are shared by every Knowns UI item. List them, say whether I changed them (check git), and ask me before you answer.
- If it asks to overwrite any other file, show me the diff and ask me.
4. Verify:
- Every file in the list above exists.
- The project type-checks (for example `npx tsc --noEmit`) and the dev build has no new errors.
5. Use it: follow the examples and props on https://ui.knowns.dev/docs/funnel-chart, and ask me if anything about my data is unclear.
If the Knowns UI MCP server is connected (https://ui.knowns.dev/docs/ai-and-mcp), use get_component({ name: "funnel-chart" }) or search_docs for details.
Finish with a short summary: the files you added or changed, the packages you installed, and anything I still need to do.Props
- steps
{ label, n }[]- Each step and how many reached it, first to last.
- note
"share"|"step"- Default
"share" - share: the share of the first step and the count lost. step: the share that moved on from the step before.
- layout
"stacked"|"row"- Default
"stacked" - stacked: label and numbers over the bar, with a step number. row: label, bar and numbers on one line from 420px of container width.
- highlightDrop
boolean- Default
true - Marks the step that loses the most, in amber, with dropLabel.
- format
(n) => string- Default
grouped digits - Format a count.
- unit
string- Default
"people" - What a count is, for the bar names: leads, deals.
- dropLabel
ReactNode- Default
"Largest drop" - The mark on the worst step.
| Prop | Type | Default | Description |
|---|---|---|---|
| steps | { label, n }[] | - | Each step and how many reached it, first to last. |
| note | "share" | "step" | "share" | share: the share of the first step and the count lost. step: the share that moved on from the step before. |
| layout | "stacked" | "row" | "stacked" | stacked: label and numbers over the bar, with a step number. row: label, bar and numbers on one line from 420px of container width. |
| highlightDrop | boolean | true | Marks the step that loses the most, in amber, with dropLabel. |
| format | (n) => string | grouped digits | Format a count. |
| unit | string | "people" | What a count is, for the bar names: leads, deals. |
| dropLabel | ReactNode | "Largest drop" | The mark on the worst step. |
One line per step
Accessibility
- The steps are an ordered list. Each bar is a progressbar named by its step, count and share.
- The largest drop is said in words next to the step, not only in colour.
What it handles
- 01Lists the steps first to last with how many reached each one.
- 02Notes either the share of the first step and the count lost, or the share that moved on from the step before.
- 03Marks the step that loses the most in amber and says so in words.
- 04Stacks the label and numbers over the bar, or puts label, bar and numbers on one line from 420px of container width.
- 05Formats counts your way and names each bar by its unit.
- 06Works out the numbers in pure helpers you can reuse: funnelRows and conversion.
States
- First render
- The bars at their values; nothing moves
- none
- Narrow card
- The row layout stacks
- none
- No drop
- No step is marked
- none
| State | What moves | Timing |
|---|---|---|
| First render | The bars at their values; nothing moves | none |
| Narrow card | The row layout stacks | none |
| No drop | No step is marked | none |
Works with
When to use
When to use
- Steps people or leads go through, with how many reached each and where the most were lost.
- A pipeline card on a dashboard with the share that moved on at each step.
When not to use
- A trend of one number over time: use Chart.
- Retention by signup week: use Dither Heatmap.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Funnel Chart to my app and wire it to my own data.
- I need steps people or leads go through, with how many reached each and where the most were lost. Set that up with the Knowns UI Funnel Chart.
- Which Funnel Chart props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "funnel-chart" }) and search_docs({ query: "funnel chart" }).