crucıble

Bitmap

Chunky 8-bit pixel loader — a hard-edged grid that fills cell-by-cell. Determinate bar (with a pulsing frontier) or an indeterminate marching band, plus a crisp bitmap-radar spinner that snaps cell-to-cell via steps(). Zero dependencies, SSR-safe, role=progressbar with aria-valuenow; collapses to a designed static frame under reduced motion.

cssfree

Installation

CLI

npx shadcn@latest add @crucible/bitmap

Props

PropTypeDefaultDescription
variant"bar" | "spinner""bar"Which loader to draw. - bar (default): a chunky pixel-grid progress bar that fills cell-by-cell. Give it a value (0–100) for a determinate fill; omit it for an indeterminate lit band that marches across and loops. - spinner: a crisp bitmap radar — a square grid of pixels with a bright arc sweeping around a dim disc, snapping cell-to-cell like an 8-bit throbber.
valuenumberundefinedDeterminate progress, 0100. When set, the bar fills to this fraction and reports aria-valuenow; when omitted (or undefined) the loader is indeterminate. Ignored by spinner.
cellsnumber24Number of columns in the bar grid.
rowsnumber3Number of rows (thickness) in the bar grid.
gridnumber7Grid dimension of the spinner (forced odd so it has a true centre).
sizenumber10Edge length of a single pixel cell, in px.
gapnumber2Gap between cells, in px — the dark mortar of the grid.
radiusnumber1Corner radius of each cell in px (0 = hard bitmap edge).
speednumber1Animation speed multiplier. 1 = default, 2 = twice as fast.
pausedbooleanfalseFreeze on a designed, legible resting frame.
onColorstring"#e8ecf5"Lit-pixel color.
offColorstring"#22252e"Unlit-pixel (track) color.
glowColorstring"#9fd8ff"Bloom color of a lit pixel. A faint cool halo by default; set equal to onColor for a flat, glow-free bitmap.
labelstring"Loading"Accessible label announced while loading.
showLabelbooleanfalseRender a blocky, marching label row beneath the grid.
labelTextstring"LOADING"Text of the marching label (uppercased, letter-spaced).
Also accepts all props of React.ComponentPropsWithoutRef<"div">they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, and passes className through.