Skip to content
ProLifetime access for $199, paid once, every future release included
Truffle UI

Pipeline Stage Bar

ProNew

Where 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

PropTypeDefault
stages*Stage[]—
value*string

The id of the stage the record is in.

—
onValueChange(id: string) => void

Lets the stage be changed by pressing a segment. Leave it out for a read-only bar.

—
notestring

A note under the bar about the current stage, e.g. "12 days in this stage".

—
labelstring

Accessible name, e.g. "Deal stage".

"Stage"
classNamestring—

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.