- Accordion
- Alert
- Alert Dialog
- Autocomplete
- Avatar
- Badge
- Breadcrumb
- Button
- Calendar
- Card
- Checkbox
- Checkbox Group
- Collapsible
- Combobox
- Command
- Date Picker
- Dialog
- DrawerNew
- Empty
- Field
- Fieldset
- Form
- Frame
- Group
- Input
- Input Group
- Kbd
- Label
- Menu
- Meter
- Number Field
- OTP FieldNew
- Pagination
- Popover
- Preview Card
- Progress
- Radio Group
- Scroll Area
- Select
- Separator
- Sheet
- Skeleton
- Slider
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Toolbar
- Tooltip
- AI Components
- Chat Conversation
- Chat Message
- Chat Response
- Chat Suggestion
- Chat Prompt Input
- Chat Attachments
- Chat Code Block
- Chat Image
- Chat Inline Citation
- Chat Reasoning
- Chat Sources
- Chat Actions
- Chat Context
- Chat Loader
- Chat Task
- Chat Tool
- Chat Web Preview
- Chat Snippet
- Chat Terminal
- Chat Stack Trace
- Chat Test Results
- Chat File Tree
- Chat Environment Variables
- Chat Audio Player
- Chat Transcription
- Chat Speech Input
- Chat Mic Selector
- Chat Voice Selector
- Chat Agent
- Chat Persona
- Chat Connection
- Chat Queue
- Chat Checkpoint
- Chat Confirmation
- Chat Artifact
- Chat JSX Preview
- Chat Schema Display
- Chat Package Info
- Chat Commit
- Chat Plan
- Chat Panel
- Chat Open In Chat
- Chat Sandbox
- Chat Model Selector
- Chat Canvas
- Chat Node
- Chat Edge
Progress
Displays the status of a task that takes a long time.
"use client";
import { useEffect, useState } from "react";
import { Progress } from "@/components/ui/progress";
export default function Particle() {
const [value, setValue] = useState(20);
useEffect(() => {
const interval = setInterval(() => {
setValue((current) =>
Math.min(100, Math.round(current + Math.random() * 25)),
);
}, 1000);
return () => clearInterval(interval);
}, []);
return <Progress value={value} />;
}
Installation
pnpm dlx shadcn@latest add @jenny/progress
Usage
import {
Progress,
ProgressLabel,
ProgressValue,
} from "@/components/ui/progress"<Progress value={40} />Note: If you render children inside Progress, you must also include ProgressTrack and ProgressIndicator inside it. Without them, the bar will not display. When no children are provided, a default track and indicator are rendered for you.
API Reference
Progress
Root component. Styled wrapper for Progress.Root from Base UI. When no children are provided, automatically renders a track and indicator.
ProgressTrack
Track container for the progress indicator. Styled wrapper for Progress.Track from Base UI.
ProgressIndicator
Visual indicator showing the current progress. Styled wrapper for Progress.Indicator from Base UI.
ProgressLabel
Label text for the progress bar. Styled wrapper for Progress.Label from Base UI.
ProgressValue
Displays the current value. Styled wrapper for Progress.Value from Base UI.
Examples
With Label and Value
import {
Progress,
ProgressIndicator,
ProgressLabel,
ProgressTrack,
ProgressValue,
} from "@/components/ui/progress";
export default function Particle() {
return (
<Progress value={60}>
<div className="flex items-center justify-between gap-2">
<ProgressLabel>Export data</ProgressLabel>
<ProgressValue />
</div>
<ProgressTrack>
<ProgressIndicator />
</ProgressTrack>
</Progress>
);
}
With Formatted Value
"use client";
import {
Progress,
ProgressIndicator,
ProgressLabel,
ProgressTrack,
ProgressValue,
} from "@/components/ui/progress";
export default function Particle() {
return (
<Progress max={512} value={502}>
<div className="flex items-center justify-between gap-2">
<ProgressLabel>Upload</ProgressLabel>
<ProgressValue>{(_formatted, value) => `${value} / 512`}</ProgressValue>
</div>
<ProgressTrack>
<ProgressIndicator />
</ProgressTrack>
</Progress>
);
}