Files
upstream-mirror 1416db152c
All checks were successful
Release / Create Version PR or Publish Stable Release (push) Has been skipped
Release / Publish Prerelease to NPM (push) Has been skipped
Monitor Registries / Monitor registry health (push) Has been skipped
snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
2026-09-15 22:44:43 +05:00

113 lines
2.2 KiB
Plaintext

---
title: Progress
description: Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.
base: aria
component: true
links:
doc: https://react-aria.adobe.com/ProgressBar
api: https://react-aria.adobe.com/ProgressBar#api
---
<ComponentPreview styleName="aria-nova" name="progress-demo" />
## Installation
<CodeTabs>
<TabsList>
<TabsTrigger value="cli">Command</TabsTrigger>
<TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>
<TabsContent value="cli">
```bash
npx shadcn@latest add progress
```
</TabsContent>
<TabsContent value="manual">
<Steps className="mb-0 pt-2">
<Step>Install the following dependencies:</Step>
```bash
npm install react-aria-components
```
<Step>Copy and paste the following code into your project.</Step>
<ComponentSource
name="progress"
title="components/ui/progress.tsx"
styleName="aria-nova"
/>
<Step>Update the import paths to match your project setup.</Step>
</Steps>
</TabsContent>
</CodeTabs>
## Usage
```tsx showLineNumbers
import { Progress } from "@/components/ui/progress"
```
```tsx showLineNumbers
<Progress aria-label="Loading" value={33} />
```
## Composition
### With label and value
Use `ProgressLabel` and `ProgressValue` to add a label and value display.
```tsx showLineNumbers
import {
Progress,
ProgressLabel,
ProgressValue,
} from "@/components/ui/progress"
;<Progress value={56} className="w-full max-w-sm">
<ProgressLabel>Upload progress</ProgressLabel>
<ProgressValue />
</Progress>
```
```text
Progress
├── ProgressLabel
├── ProgressValue
└── ProgressTrack
└── ProgressIndicator
```
## Label
Use `ProgressLabel` and `ProgressValue` to add a label and value display.
<ComponentPreview styleName="aria-nova" name="progress-label" />
## Controlled
A progress bar that can be controlled by a slider.
<ComponentPreview styleName="aria-nova" name="progress-controlled" />
## RTL
To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/rtl).
<ComponentPreview styleName="aria-nova" name="progress-rtl" direction="rtl" />
## API Reference
See the [React Aria ProgressBar](https://react-aria.adobe.com/ProgressBar#api) documentation.