snapshot of https://github.com/shadcn-ui/ui.git (main, 2026-09-15; blobs > 131072B omitted)
This commit is contained in:
85
apps/v4/content/docs/components/radix/progress.mdx
Normal file
85
apps/v4/content/docs/components/radix/progress.mdx
Normal file
@@ -0,0 +1,85 @@
|
||||
---
|
||||
title: Progress
|
||||
description: Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.
|
||||
base: radix
|
||||
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 styleName="radix-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 radix-ui
|
||||
```
|
||||
|
||||
<Step>Copy and paste the following code into your project.</Step>
|
||||
|
||||
<ComponentSource
|
||||
name="progress"
|
||||
title="components/ui/progress.tsx"
|
||||
styleName="radix-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 value={33} />
|
||||
```
|
||||
|
||||
## Label
|
||||
|
||||
Use a `Field` component to add a label to the progress bar.
|
||||
|
||||
<ComponentPreview styleName="radix-nova" name="progress-label" />
|
||||
|
||||
## Controlled
|
||||
|
||||
A progress bar that can be controlled by a slider.
|
||||
|
||||
<ComponentPreview styleName="radix-nova" name="progress-controlled" />
|
||||
|
||||
## RTL
|
||||
|
||||
To enable RTL support in shadcn/ui, see the [RTL configuration guide](/docs/rtl).
|
||||
|
||||
<ComponentPreview styleName="radix-nova" name="progress-rtl" direction="rtl" />
|
||||
|
||||
## API Reference
|
||||
|
||||
See the [Radix UI Progress](https://www.radix-ui.com/docs/primitives/components/progress#api-reference) documentation.
|
||||
Reference in New Issue
Block a user