mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-15 11:51:34 +00:00
62 lines
1.1 KiB
Plaintext
62 lines
1.1 KiB
Plaintext
---
|
|
title: Progress
|
|
description: Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.
|
|
component: true
|
|
links:
|
|
doc: https://www.radix-ui.com/docs/primitives/components/progress
|
|
api: https://www.radix-ui.com/docs/primitives/components/progress#api-reference
|
|
---
|
|
|
|
<ComponentPreview
|
|
name="progress-demo"
|
|
description="A progress bar component."
|
|
/>
|
|
|
|
## Installation
|
|
|
|
<CodeTabs>
|
|
|
|
<TabsList>
|
|
<TabsTrigger value="cli">CLI</TabsTrigger>
|
|
<TabsTrigger value="manual">Manual</TabsTrigger>
|
|
</TabsList>
|
|
<TabsContent value="cli">
|
|
|
|
```bash
|
|
npx shadcn@latest add progress
|
|
```
|
|
|
|
</TabsContent>
|
|
|
|
<TabsContent value="manual">
|
|
|
|
<Steps>
|
|
|
|
<Step>Install the following dependencies:</Step>
|
|
|
|
```bash
|
|
npm install @radix-ui/react-progress
|
|
```
|
|
|
|
<Step>Copy and paste the following code into your project.</Step>
|
|
|
|
<ComponentSource name="progress" />
|
|
|
|
<Step>Update the import paths to match your project setup.</Step>
|
|
|
|
</Steps>
|
|
|
|
</TabsContent>
|
|
|
|
</CodeTabs>
|
|
|
|
## Usage
|
|
|
|
```tsx
|
|
import { Progress } from "@/components/ui/progress"
|
|
```
|
|
|
|
```tsx
|
|
<Progress value={33} />
|
|
```
|