A sales pipeline in stage columns. Each stage adds up its deals and their weighted value, and a deal moves by drag or with the keyboard, with every step announced.
On this page
Used for
- Sales pipeline
- Renewals board
- Partner deals
- Hiring funnel
- Grants and bids
Examples
Refusing a move
Installation
npx knowns-ui@latest add deal-pipelineFor 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 Deal pipeline 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/deal-pipeline
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 deal-pipeline
```
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/avatar.tsx
- components/ui/knowns/blocks/crm/deal-pipeline.tsx
- components/ui/knowns/blocks/crm/deal-pipeline-utils.ts
and installs these npm packages: clsx@^2.1.1, tailwind-merge@^3.7.0.
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/deal-pipeline, 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: "deal-pipeline" }) 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
- stages
{ id, title, probability, tone?, locked? }[]- The columns in order. probability (0 to 1) weights the stage's value. locked stages take no drops.
- deals / defaultDeals
Deal[]- Controlled or initial deals. Array order is the order inside a stage. A deal whose stage is unknown is not shown.
- onDealsChange
(deals) => void- Called with the new array after a move.
- onMove
(move: { deal, from, to, index }) => boolean|void- After a drop. Return false to refuse; the deal goes back.
- onDealOpen
(deal) => void- Click or Enter on a card.
- today
string- ISO date. Close dates before it read overdue, within seven days soon. Without it nothing is marked.
- currency
string- Default
"USD" - ISO 4217 code for amounts.
- title / actions
ReactNode- Header title and right side.
- columnMinWidth
number- Default
256 - Narrowest a stage gets, in px; past that the board scrolls.
- surface
"panel"|"none"- Default
"panel" - Draw its own card, or none for a page.
- Deal
{ id, stage, title, amount, company?, close?, owner?, lastTouch? }- amount is in major units. close is YYYY-MM-DD. lastTouch is text you format.
| Prop | Type | Default | Description |
|---|---|---|---|
| stages | { id, title, probability, tone?, locked? }[] | - | The columns in order. probability (0 to 1) weights the stage's value. locked stages take no drops. |
| deals / defaultDeals | Deal[] | - | Controlled or initial deals. Array order is the order inside a stage. A deal whose stage is unknown is not shown. |
| onDealsChange | (deals) => void | - | Called with the new array after a move. |
| onMove | (move: { deal, from, to, index }) => boolean | void | - | After a drop. Return false to refuse; the deal goes back. |
| onDealOpen | (deal) => void | - | Click or Enter on a card. |
| today | string | - | ISO date. Close dates before it read overdue, within seven days soon. Without it nothing is marked. |
| currency | string | "USD" | ISO 4217 code for amounts. |
| title / actions | ReactNode | - | Header title and right side. |
| columnMinWidth | number | 256 | Narrowest a stage gets, in px; past that the board scrolls. |
| surface | "panel" | "none" | "panel" | Draw its own card, or none for a page. |
| Deal | { id, stage, title, amount, company?, close?, owner?, lastTouch? } | - | amount is in major units. close is YYYY-MM-DD. lastTouch is text you format. |
What it handles
- 01Lays deals out in stage columns, each with its deal count, total value and weighted value (total times the stage's chance to close).
- 02Adds up the whole pipeline in the header: deals, total and weighted.
- 03Shows on each card the title, company, amount, close date, owner and last touch. A close date before today reads overdue, within a week reads soon.
- 04Moves a deal by drag (mouse anywhere on the card, touch and pen by the grip) or by keyboard: Space lifts it, arrows move it, Space or Enter drops it, Escape puts it back.
- 05Announces every step to a screen reader: picked up, new stage and position, dropped, cancelled or refused.
- 06Lets onMove refuse a move, locks a stage that people should not fill by hand, and works controlled or uncontrolled.
States
- First render
- Nothing plays; the board paints as it is
- none
- Deal lands in a stage
- The card glides from its old slot to the new one; cards that make room in both columns shift with it (translate only)
- 280ms, ease in-out
- Totals change
- Counts, totals and weighted values count to the new number
- 280ms, ease out
- Lifted by keyboard
- The card shows a ring and sits in the slot it would drop into
- none
- Dragging
- A floating copy follows the pointer 1:1 with no transition; the card dims in the slot it would drop into and the cards around it make room
- none while following
- Column under the card
- The column background steps up a shade
- 120ms, ease out
- Move refused
- The deal goes back and the status line says so
- none
- Reduced motion
- Cards snap into place and numbers change at once; nothing else differs
- 0ms
| State | What moves | Timing |
|---|---|---|
| First render | Nothing plays; the board paints as it is | none |
| Deal lands in a stage | The card glides from its old slot to the new one; cards that make room in both columns shift with it (translate only) | 280ms, ease in-out |
| Totals change | Counts, totals and weighted values count to the new number | 280ms, ease out |
| Lifted by keyboard | The card shows a ring and sits in the slot it would drop into | none |
| Dragging | A floating copy follows the pointer 1:1 with no transition; the card dims in the slot it would drop into and the cards around it make room | none while following |
| Column under the card | The column background steps up a shade | 120ms, ease out |
| Move refused | The deal goes back and the status line says so | none |
| Reduced motion | Cards snap into place and numbers change at once; nothing else differs | 0ms |
Works with
When to use
When to use
- A sales or renewals pipeline where each stage has a chance to close and the weighted value matters.
- Any staged list of things with an amount: partner deals, bids, hiring offers.
When not to use
- Task boards with WIP limits and swimlanes: use Kanban Board.
- A flat sortable list of deals: use Data Table.
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 Deal Pipeline to my app and wire it to my own data.
- I need a sales or renewals pipeline where each stage has a chance to close and the weighted value matters. Set that up with the Knowns UI Deal Pipeline.
- Which Deal Pipeline props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "deal-pipeline" }) and search_docs({ query: "deal pipeline" }).