Pipeline Stage Bar
ProNewWhere a record stands in a pipeline, as chevrons you can press to move it. Labels collapse to positions on narrow containers so the bar never wraps.
Installation
pnpm dlx shadcn@latest add @viewport/pipeline-stage-bar
First time? Add the @viewport registry to components.json. Setup takes one minute.
Usage
The code behind the preview above comes with Truffle Pro.
Props
| Prop | Type | Default |
|---|---|---|
| stages* | Stage[] | — |
| value* | stringThe id of the stage the record is in. | — |
| onValueChange | (id: string) => voidLets the stage be changed by pressing a segment. Leave it out for a read-only bar. | — |
| note | stringA note under the bar about the current stage, e.g. "12 days in this stage". | — |
| label | stringAccessible name, e.g. "Deal stage". | "Stage" |
| className | string | — |
Accessibility
- An ordered list; the current stage has aria-current and each stage states whether it is done.
- Each segment is a button when the stage can be changed.
- The state is a check and a fill as well as a color.
- Respects prefers-reduced-motion.