shadcn.io is not affiliated with official shadcn/ui
Progress examples · Colored
Gradient Progress for React
A progress bar at 65 percent whose fill blends from the info color into the primary color.
A progress bar whose fill blends from the theme's info color into primary, for a brand touch on a prominent bar. The track keeps its default color.
Preview
Installation
FAQ
How does the fill become a gradient?
With classes on Progress that reach the fill: **:data-[slot=progress-indicator]:bg-linear-to-r, from-info and to-primary under the same selector. The track is untouched.
How do I change the colors?
Swap from-info and to-primary for other theme colors. Theme colors follow light and dark mode; palette classes like from-blue-500 don't.
Does the gradient flip in right-to-left layouts?
No. bg-linear-to-r always runs left to right. Use bg-linear-to-l under rtl: if the blend should follow the reading direction.
Does the gradient stretch with the value?
The gradient spans the fill, so at 65 it runs across 65 percent of the track and changes as the fill grows.
Related
- Info ProgressA progress bar at 60 percent in the info
- Success ProgressA progress bar at 70 percent in the
- Half ProgressA progress bar at 50 percent, filled to
- Badge with Text (Standard)A default badge with a short label for a
- Button with Text (Standard)The one filled action
- Warning ProgressA progress bar at 50 percent in the