Pipeline
Where an opportunity is in its pipeline: a circle per stage, the current one open into a pill with its name. Every stage is a button with a rich tooltip saying what it means and how long was spent there. With onStageChange, pressing a stage moves there and an unreached stage previews its colours on hover.
BetaReady to use. Its API can still change in a minor release; the changelog says when.
LEAP CRMBuilt for the CRM from the core library. It knows about the CRM's own records, so it isn't a general building block.
import { Pipeline } from "@leap-crm/design-system";Movable
Press a stage to move there: the pill closes and the new one opens while the connectors between them fill with colour one after another, or drain back when you move back. Hover an unreached stage to preview its colours; Tab through for the tooltips.
- Enquiry (Visited)2d 4hNew enquiry, awaiting qualificationClick to change
- Qualifying (Visited)1d 2hChecking conflicts and whether the firm can take the matterClick to change
- Scheduled (Current)21d 6hInitial consultation booked
- AgreementCosts agreement sent for signingClick to change
- ActiveClient engaged the firm, work on the matter has startedClick to change
- ClosedThe matter is finishedClick to change
- LostThe client went elsewhereClick to change
- DisqualifiedThe firm can't take the matterClick to change
Each stage current
Every stage up to the current one is visited, in its own colour, and the connectors between two visited stages fade from one colour to the next.
- Enquiry (Current)2d 4hNew enquiry, awaiting qualification
- Qualifying1d 2hChecking conflicts and whether the firm can take the matter
- Scheduled21d 6hInitial consultation booked
- AgreementCosts agreement sent for signing
- ActiveClient engaged the firm, work on the matter has started
- ClosedThe matter is finished
- LostThe client went elsewhere
- DisqualifiedThe firm can't take the matter
- Enquiry (Visited)2d 4hNew enquiry, awaiting qualification
- Qualifying (Current)1d 2hChecking conflicts and whether the firm can take the matter
- Scheduled21d 6hInitial consultation booked
- AgreementCosts agreement sent for signing
- ActiveClient engaged the firm, work on the matter has started
- ClosedThe matter is finished
- LostThe client went elsewhere
- DisqualifiedThe firm can't take the matter
- Enquiry (Visited)2d 4hNew enquiry, awaiting qualification
- Qualifying (Visited)1d 2hChecking conflicts and whether the firm can take the matter
- Scheduled (Current)21d 6hInitial consultation booked
- AgreementCosts agreement sent for signing
- ActiveClient engaged the firm, work on the matter has started
- ClosedThe matter is finished
- LostThe client went elsewhere
- DisqualifiedThe firm can't take the matter
- Enquiry (Visited)2d 4hNew enquiry, awaiting qualification
- Qualifying (Visited)1d 2hChecking conflicts and whether the firm can take the matter
- Scheduled (Visited)21d 6hInitial consultation booked
- Agreement (Current)Costs agreement sent for signing
- ActiveClient engaged the firm, work on the matter has started
- ClosedThe matter is finished
- LostThe client went elsewhere
- DisqualifiedThe firm can't take the matter
- Enquiry (Visited)2d 4hNew enquiry, awaiting qualification
- Qualifying (Visited)1d 2hChecking conflicts and whether the firm can take the matter
- Scheduled (Visited)21d 6hInitial consultation booked
- Agreement (Visited)Costs agreement sent for signing
- Active (Current)Client engaged the firm, work on the matter has started
- ClosedThe matter is finished
- LostThe client went elsewhere
- DisqualifiedThe firm can't take the matter
- Enquiry (Visited)2d 4hNew enquiry, awaiting qualification
- Qualifying (Visited)1d 2hChecking conflicts and whether the firm can take the matter
- Scheduled (Visited)21d 6hInitial consultation booked
- Agreement (Visited)Costs agreement sent for signing
- Active (Visited)Client engaged the firm, work on the matter has started
- Closed (Current)The matter is finished
- LostThe client went elsewhere
- DisqualifiedThe firm can't take the matter
Lost and disqualified
An opportunity that leaves the run keeps the stages it reached, and the way out opens into the pill.
- Enquiry (Visited)2d 4hNew enquiry, awaiting qualification
- Qualifying (Visited)1d 2hChecking conflicts and whether the firm can take the matter
- Scheduled21d 6hInitial consultation booked
- AgreementCosts agreement sent for signing
- ActiveClient engaged the firm, work on the matter has started
- ClosedThe matter is finished
- Lost (Current)The client went elsewhere
- DisqualifiedThe firm can't take the matter
- Enquiry (Visited)2d 4hNew enquiry, awaiting qualification
- Qualifying1d 2hChecking conflicts and whether the firm can take the matter
- Scheduled21d 6hInitial consultation booked
- AgreementCosts agreement sent for signing
- ActiveClient engaged the firm, work on the matter has started
- ClosedThe matter is finished
- LostThe client went elsewhere
- Disqualified (Current)The firm can't take the matter
Read only
Without onStageChange the stages only show where things are: no hover preview, no Click to change hint.
- Enquiry (Visited)2d 4hNew enquiry, awaiting qualification
- Qualifying (Visited)1d 2hChecking conflicts and whether the firm can take the matter
- Scheduled (Visited)21d 6hInitial consultation booked
- Agreement (Current)Costs agreement sent for signing
- ActiveClient engaged the firm, work on the matter has started
- ClosedThe matter is finished
- LostThe client went elsewhere
- DisqualifiedThe firm can't take the matter
What the examples share
The imports and the scaffolding the examples above call. The scaffolding lives in this page, not in the library.
import { BadgeX, Ban, BookOpenCheck, Calendar, DoorClosedLocked, FileSignature, MessageCircleMore, ShieldCheck } from "lucide-react";
import { useState } from "react";
import { Pipeline, type PipelineStage } from "@leap-crm/design-system";
const stages: PipelineStage[] = [
{
id: "enquiry",
label: "Enquiry",
icon: <MessageCircleMore />,
tone: "info",
description: "New enquiry, awaiting qualification",
time: "2d 4h",
},
{
id: "qualifying",
label: "Qualifying",
icon: <ShieldCheck />,
tone: "warning",
description: "Checking conflicts and whether the firm can take the matter",
time: "1d 2h",
},
{
id: "scheduled",
label: "Scheduled",
icon: <Calendar />,
tone: "success",
description: "Initial consultation booked",
time: "21d 6h",
},
{
id: "agreement",
label: "Agreement",
icon: <FileSignature />,
tone: "teal",
description: "Costs agreement sent for signing",
},
{
id: "active",
label: "Active",
icon: <BookOpenCheck />,
tone: "purple",
description: "Client engaged the firm, work on the matter has started",
},
{
id: "closed",
label: "Closed",
icon: <DoorClosedLocked />,
tone: "default",
description: "The matter is finished",
},
];
const endings: PipelineStage[] = [
{
id: "lost",
label: "Lost",
icon: <BadgeX />,
tone: "destructive",
description: "The client went elsewhere",
},
{
id: "disqualified",
label: "Disqualified",
icon: <Ban />,
tone: "plum",
description: "The firm can't take the matter",
},
];
function MovablePipeline() {
const [current, setCurrent] = useState("scheduled");
return (
<Pipeline
stages={stages}
endings={endings}
current={current}
onStageChange={setCurrent}
/>
);
}Best practices
When to use it, and the rules that apply in particular places.
| Guidance | Practice |
|---|---|
| Do | Put the ways out of the run, like Lost and Disqualified, in endings, so they sit after a divider and the stages read forward. |
| Do | Name stages in the region's terms (Enquiry or Lead, Agreement or Engagement) and give each a description and time, so its tooltip says what the stage means and how long was spent there. |
| Do | Pass onStageChange only where the lawyer may move the opportunity. Without it the pipeline only shows where things are. |
| Do | Set aria-label, like “Opportunity stage”, so screen readers know what the stages belong to. |
| Don't | Use it for the steps of a setup flow. Use StepHeader; Pipeline shows where an opportunity stands. |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| stages * | unknown | — | The run of stages, joined by connectors, in order. |
| endings | unknown | [] | Ways out of the run, like Lost and Disqualified: after a 16 px gap, split by a divider. |
| current | string | null | null | The stage it's at now. It opens into a pill with its name. |
| visited | unknown | — | Stages reached. By default every stage up to the current one. |
| onStageChange | (id: string) => void | — | Makes every other stage pressable, to move there. Without it the pipeline only shows where things are. |
| aria-label | string | "Pipeline" | Names the pipeline for screen readers. |
| className | string | — | Classes added to the root element, merged with its own. Tokens only. |
Keyboard
The keys it answers to. Tab moves between components, arrows move within them.
| Keys | What they do |
|---|---|
| Tab | Moves from stage to stage; a stage's tooltip shows when focus reaches it. |
| EnterSpace | Choose the focused stage. |
| Escape | Closes the stage's tooltip. |







