Back to Shadcn Ui

Progress

apps/v4/content/docs/components/radix/progress.mdx

latest1.4 KB
Original Source
<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
import { Progress } from "@/components/ui/progress"
tsx
<Progress value={33} />

Examples

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.

<ComponentPreview styleName="radix-nova" name="progress-rtl" direction="rtl" />

API Reference

See the Radix UI Progress documentation.