brijr/ui

Lab

Progress

npx shadcn@latest add @brijr/progress

Value

value={0}
value={33}
value={66}
value={100}
value={null} · indeterminate

Label and value

ProgressLabel names the bar; ProgressValue shows the formatted value and is empty while indeterminate.

Uploading files
ProgressLabel · ProgressValue · 0
Uploading files
ProgressLabel · ProgressValue · 33
Uploading files
ProgressLabel · ProgressValue · 66
Uploading files
ProgressLabel · ProgressValue · 100
Preparing export
ProgressLabel · ProgressValue · null
Indexing repository
ProgressLabel only
Copying 1,284 files from the archive to the shared workspace
long label

Range and format

Account setup, step 3 of 5
min={1} max={5} value={3}
Copying files
ProgressValue children · getValueLabel
Downloading
format · unit "gigabyte"

Parts

Progress adds a ProgressTrack after its children unless one of its direct children is a ProgressTrack, or track is passed. track takes the element to render, or null for none; use track={null} when your track sits inside a wrapper. ProgressTrack fills itself with a ProgressIndicator unless it has children.

Syncing
<ProgressTrack className="h-1" /> as a child · one track
track={<ProgressTrack className="h-3" />}
Syncing
ProgressTrack first · label below
Syncing
2 min left
track={null} · ProgressTrack inside a wrapper
ProgressTrack · ProgressIndicator children
Syncing
track={null} · value only

Width

w-24
w-48
w-full