mirror of
https://github.com/shadcn-ui/ui.git
synced 2026-06-24 13:15:45 +00:00
55 lines
1.1 KiB
Plaintext
55 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
|
|
radix:
|
|
link: https://www.radix-ui.com/docs/primitives/components/progress
|
|
api: https://www.radix-ui.com/docs/primitives/components/progress#api-reference
|
|
---
|
|
|
|
<ComponentExample src="/components/examples/progress/demo.tsx">
|
|
<ProgressDemo />
|
|
</ComponentExample>
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
npx shadcn-ui add progress
|
|
```
|
|
|
|
<Accordion type="single" collapsible>
|
|
<AccordionItem value="manual-installation">
|
|
<AccordionTrigger>Manual Installation</AccordionTrigger>
|
|
<AccordionContent>
|
|
|
|
1. Install the `@radix-ui/react-progress` component from radix-ui:
|
|
|
|
```bash
|
|
npm install @radix-ui/react-progress
|
|
```
|
|
|
|
2. Copy and paste the following code into your project.
|
|
|
|
<ComponentSource src="/components/ui/progress.tsx" />
|
|
|
|
<Callout>
|
|
|
|
This is the `<Progress />` primitive. You can place it in a file at `components/ui/progress.tsx`.
|
|
|
|
</Callout>
|
|
|
|
</AccordionContent>
|
|
|
|
</AccordionItem>
|
|
</Accordion>
|
|
|
|
## Usage
|
|
|
|
```tsx
|
|
import { Progress } from "@/components/ui/progress"
|
|
```
|
|
|
|
```tsx
|
|
<Progress value={33} />
|
|
```
|