Skip to content
Sign in
EffectsSegmented progressMenu

Segmented progressPro

An LCD style segmented bar for queued and running jobs, with a tabular percent and five states.

ProA render queue with one job on the LCD meter and every status in the list.

Installation

$ pnpm dlx shadcn@latest add @chatcn-pro/segmented-progress

Usage

tsx
import { SegmentedProgress } from "@/components/ui/chatcn/pro/segmented-progress"

<SegmentedProgress value={job.progress} status={job.status} label={job.name} />

Examples

States

ProQueued, running, paused, done, failed and empty, sizes, a bare bar and a long label.

States

StatusShows
queuedClock and Queued, empty segments, detail in place of the percent
runningAccent segments, the next one blinking at the share already done
pausedPause and Paused, segments in gray
doneCheck and Done, every segment green
failedCross and Failed, tinted segments with the one where it stopped in red

Props

PropTypeNotes
valuenumberProgress from 0 to max
maxnumberDefault 100
statusSegmentedProgressStatusDefaults to done at max, otherwise running
segmentsnumberDefault 24
size"sm" | "md" | "lg"4, 8 or 16 px tall. lg is the LCD meter
labelReactNodeOne line, cut at the end
detailReactNodeReplaces the percent: "3rd in queue", "12 of 12"
statusLabelsPartial<Record<status, string>>Translated status words
showStatus, showValuebooleanDefault true
ticksbooleanScale marks at 0, 25, 50, 75 and 100

Keyboard

Not interactive.

Accessibility

  • role="progressbar" with aria-valuenow and a value text such as "43%, Running". Queued has no value yet.
  • Every state has a word, and all but running an icon, so color is never the only cue.
  • Under forced-colors segments draw as outlined boxes, filled in CanvasText.

Motion

  • Segments fill whole with a 150 ms color fade. The leading segment blinks like an LCD cursor at 1.2 s while running and holds still under reduced motion.