Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Get Started
"use client"
import * as React from "react"
import { Progress } from "@/components/ui/progress"
export function ProgressDemo() {
const [progress, setProgress] = React.useState(13)
React.useEffect(() => {
const timer = setTimeout(() => setProgress(66), 500)
return () => clearTimeout(timer)
}, [])
return <Progress value={progress} className="w-[60%]" />
}
Installation
pnpm dlx shadcn@latest add progress
Usage
import { Progress } from "@/components/ui/progress"<Progress value={33} />Examples
Label
Use a Field component to add a label to the progress bar.
import { Field, FieldLabel } from "@/components/ui/field"
import { Progress } from "@/components/ui/progress"
export function ProgressWithLabel() {
return (
<Field className="w-full max-w-sm">
<FieldLabel htmlFor="progress-upload">
<span>Upload progress</span>
<span className="ml-auto">66%</span>
</FieldLabel>
<Progress value={66} id="progress-upload" />
</Field>
)
}
Controlled
A progress bar that can be controlled by a slider.
"use client"
import * as React from "react"
import { Progress } from "@/components/ui/progress"
import { Slider } from "@/components/ui/slider"
export function ProgressControlled() {
const [value, setValue] = React.useState([50])
return (
<div className="flex w-full max-w-sm flex-col gap-4">
<Progress value={value[0]} />
<Slider
value={value}
onValueChange={setValue}
min={0}
max={100}
step={1}
/>
</div>
)
}
API Reference
See the Radix UI Progress documentation.
Deploy your shadcn/ui app on Vercel
Trusted by OpenAI, Sonos, Adobe, and more.
Vercel provides tools and infrastructure to deploy apps and features at scale.
Deploy to Vercel