Progress
Horizontal progress bar with determinate and indeterminate modes, drawn in hard-edged character cells by default. Uses native progressbar ARIA with value clamping and a terminal-inspired sliding animation for indeterminate state.
Installation
dgadd is not public on npm yet. Until the first release, pack @diffgazer/add from the repository and install that tarball into this app, which is what puts dgadd on pnpm exec.
The hosted registry is not public yet because r.b4r7.dev does not resolve. Use this source checkout or a local registry preview until the endpoint returns 200.
Diffgazer packages are not yet published to npm. Until the first release, pack @diffgazer/ui and @diffgazer/keys from the repository and install those tarballs.
UI components require Tailwind CSS v4. Local copy mode imports src/styles/styles.css; package mode uses @diffgazer/ui CSS once packages are available.
Usage
Examples
Variants
Sizes
Labeled with value text
API Reference
Progress
Data attributes
CSS variables
Accessibility
Notes
Indeterminate Mode
When value is undefined, the bar enters indeterminate mode with a sliding fill animation. The aria-valuenow attribute is omitted per WAI-ARIA spec.
Value Clamping
The value is clamped between 0 and max. Values outside this range are silently corrected. A NaN value is normalized to 0 before clamping. A non-finite, zero, or negative max is normalized to the default of 100 before ARIA values and fill width are calculated.
Cells vs Bar
variant="cells" (default) masks track and fill into --progress-cell wide cells, so Progress speaks the same quantity language as BlockBar. The mask lives on the root, so the cells stay phase-aligned as the fill grows and the leading edge fills them one by one. variant="bar" keeps the continuous rounded track for hairline-thin inline uses. size="sm" is a 4px track — below the useful cell threshold — so it renders as the continuous bar even under variant="cells".
Reduced Motion
The indeterminate animation respects prefers-reduced-motion: reduce. When active, the bar renders a static 40% fill, and the determinate fill stops animating its width.
Progress vs BlockBar
Progress is the pixel bar for task completion: role=progressbar, a solid fill, and an indeterminate mode for work with no known duration. BlockBar is the character-cell meter for a steady-state measurement (role=meter) — coverage, token budget, severity mix — drawn from filled/empty glyphs and stackable into colored segments. Reach for Progress when something is running, BlockBar when something is being measured.
Source
Install via CLI: pnpm exec dgadd add ui/progress.
Highlighted source loads after this disclosure opens. Browse the source repository.