Progress
Displays an indicator showing the completion progress of a task. Built for React applications with Next.js integration and TypeScript support.
Those loading bars you see everywhere? File uploads, form submissions, installation wizards - that's what progress bars are for. They let people know stuff is actually happening and how much longer they need to wait.
Animated progress indicator
Watch it fill up as your task completes:
Built on Radix UI Progress with proper ARIA attributes, so screen readers announce the progress too. This free open source React component handles all the accessibility stuff while you focus on making it look good.
npx shadcn@latest add progress
Why progress bars beat spinners
Sometimes a spinner just doesn't cut it. When you know how far along something is, show it:
- Sets expectations - People know if they should grab coffee or wait
- Shows it's working - Proof something's actually happening
- Reduces anxiety - Unknown wait times stress people out
- Accessible by default - Screen readers announce the percentage
- Better for long tasks - Essential for uploads, downloads, multi-step processes
- Cancellation decisions - Users can decide if it's worth waiting
Useful progress patterns
File upload with progress
Show real upload progress with file info:
Multi-step form progress
Track progress through a wizard or onboarding:
Loading states with progress
Better than a spinner when you know the timeline:
These patterns work because they give users real information. Upload progress that actually moves, form steps that show how far you've come, loading states that don't feel endless.
Perfect for user feedback
Works great anywhere you've got something that takes time - file operations, data processing, form wizards, installation flows. The kind of stuff where users need to know it's worth sticking around.
Drops right into Next.js projects. TypeScript support included. Styled with Tailwind CSS to match the shadcn design system.
Built on Radix UI
Under the hood it's all Radix UI Progress, which means:
- ARIA compliant - Proper progressbar role and attributes
- Screen reader support - Announces current value and completion
- Indeterminate state - For when you don't know the progress
- Custom value labels - Format the announcement however you want
- Min/max support - Not just 0-100, use any range
- Data attributes - Style based on loading, complete, or indeterminate states
API Reference
Progress
The root container that provides context and accessibility.
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | Additional CSS classes |
value | number | null | 0 | Current progress value |
max | number | 100 | Maximum progress value |
getValueLabel | (value: number, max: number) => string | - | Custom label for screen readers |
asChild | boolean | false | Pass functionality to child element |
Data attributes:
[data-state]
: "complete" | "indeterminate" | "loading"[data-value]
: Current value[data-max]
: Maximum value
Progress Indicator
The visual fill that shows progress. This is built into the shadcn component by default.
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | Additional CSS classes |
asChild | boolean | false | Pass functionality to child element |
States
State | When | Visual |
---|---|---|
Loading | 0 < value < max | Partial fill |
Complete | value >= max | Full fill |
Indeterminate | value = null | Animation or pulse |
Common Patterns
Pattern | Use Case | Implementation |
---|---|---|
Percentage label | Show exact progress | Add text above/below bar |
Stepped progress | Multi-step forms | Multiple bars or segments |
Circular progress | Compact spaces | Use radial variant |
Buffering | Video/audio players | Two-layer progress |
Make progress feel right
Things to remember when adding progress bars:
- Start immediately - Show 1% right away so they know it started
- Keep it moving - Stalled progress feels broken
- Be honest - Don't fake it to 90% then hang forever
- Show what's happening - "Uploading photo..." is better than just a bar
- Handle errors gracefully - What happens if it fails at 67%?
- Consider time estimates - "About 30 seconds remaining" helps a lot
- Allow cancellation - Long operations need an escape hatch
- Celebrate completion - Quick success state before moving on