Skip to content
Pixelbits
Docs / Progress
Data display

Progress

Shows how far a task has come. role="progressbar" with the value exposed to screen readers; without a value it is indeterminate (a pixel band glides across). CSS only; the bar grows with a GPU transform.

Uploading assets64%
Building registry65%

Installation

npm: import
import { Progress } from "pixelbits/progress";
shadcn: copy the source
npx shadcn add https://pixelbits.ali-moradi-develop.com/r/progress.json

API

<Progress>

Shows how far a task has come. role="progressbar" with the value exposed to screen readers; without a value it is indeterminate (a pixel band glides across). CSS only; the bar grows with a GPU transform.

Example
<Progress label="Uploading assets" value={64} />
<Progress label="Building registry" value={26} max={40} variant="pixel" />
PropTypeDefaultDescription
valuenumber—

Current value between 0 and max. Omit for an indeterminate bar.

maxnumber100

The value that means done.

variant"bar" | "pixel""bar"
  • "bar": a thin continuous bar.
  • "pixel": a row of squares that light up, with a few flickering at the edge.
segmentsnumber40

Number of squares for the "pixel" variant.

labelReactNode—

Visible label above the bar; also its accessible name.

showValuebooleantrue

Show the value (as a percent) next to the label.

aria-labelstring—

Accessible name when there is no visible label.

Also accepts every prop of HTMLAttributes<HTMLDivElement>.