shadcn.io is not affiliated with official shadcn/ui
Progress examples · With Label
With Label Above Progress for React
A progress bar at 45 percent with an Uploading... label above it.
Framework
UI library
A progress bar with a label above it that says what is happening. The label is the component's ProgressLabel, so it also names the bar for screen readers.
Preview
Installation
Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.
FAQ
How does the label sit above the bar?
ProgressLabel is a child of Progress, and the track renders after the children at full width, so it wraps onto the next line. gap-2 is the space between them.
How do I change the label?
Change the children of ProgressLabel. Its type style comes from the theme's progress styles; add a className to change it.
How do I show the percentage too?
Add a ProgressValue after the label. It prints the value and sits at the end of the row, as With Percentage shows.
Related
- With Label Below ProgressA progress bar at 80 percent with an
- With Percentage ProgressA progress bar at 65 percent with a label
- Multi-line Label ProgressA progress bar at 35 percent under a
- Empty ProgressA progress bar at 0 percent: an empty
- Default SpinnerA spinner at its default size and color
- With Count ProgressA progress bar for 7 of 10 tasks