Skip to content

COMPONENT / segmented-progress

Segmented Progress_

Determinate progress bar of hard --signal segments under a big padded percentage and a phase label. Requires @cybr/tokens.

Install

  1. 1. Map the @cybr namespace, once per project. Add this inside your components.json, or into its existing "registries" object. No components.json yet? Run npx shadcn@latest init first to create one.

    "registries": { "@cybr": "https://cybr-ui.com/r/{name}.json" }
  2. 2. Add components:

    $ npx shadcn@latest add @cybr/segmented-progress

If shadcn reports Unknown registry "@cybr", step 1 is missing from that project's components.json.

Preview

HANDSHAKE

Props

Component props
PropTypeDefaultDescription
valuenumber—Current progress. Clamped to 0 to max; a value that is not finite counts as 0.
maxnumber100The value at full. Values that are not finite or not above 0 fall back to 100.
segmentsnumber20Number of segments in the track, at least 1.
labelstring—Required accessible name for the progressbar, such as Loading or Uploading assets.
phaseReactNode—Short status on the right of the readout, such as HANDSHAKE.
showValuebooleantrueShows the big 3-digit percentage readout.
classNamestring—Extra classes, merged after the defaults with cn().
...propsOmit<ComponentProps<"div">, "children">—Every other native <div> attribute and ref is forwarded.

Usage

Needs the stylesheet from @cybr/tokens. After the install, import it in app/globals.css:

@import "tailwindcss";
@import "../styles/cybr-tokens.css";
import { SegmentedProgress } from "@/components/ui/segmented-progress";

export function Upload({ done }: { done: number }) {
  return <SegmentedProgress value={done} label="Uploading assets" phase="TRANSFER" />;
}

States

Accessibility