āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā ā š shadcn/directory/akash3444/basecn/components/progress ā āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
The Progress component is similar to Radix UI's Progress component, so you don't need to change anything to migrate.
However, there are some additional components you can use to enhance the progress bar.
The ProgressLabel component displays a descriptive label for the progress bar. When using labels, you'll need to compose the Progress component manually using ProgressTrack and ProgressIndicator. This gives you complete control over the layout and positioning of labels, tracks, and values.
import {
Progress,
ProgressLabel,
ProgressTrack,
ProgressIndicator,
} from "@/components/ui/progress";
<Progress value={50}>
// [!code highlight]
<ProgressLabel>Progress</ProgressLabel>
<ProgressTrack>
<ProgressIndicator />
</ProgressTrack>
</Progress>
The ProgressValue component displays the current progress value in a readable format. When using values, you'll need to compose the Progress component manually using ProgressTrack and ProgressIndicator. This gives you complete control over the layout and positioning of labels, tracks, and values.
The ProgressValue component accepts a render function that provides access to both the formatted value (with percentage) and the raw progress value. This allows for custom formatting and display logic.
import {
Progress,
ProgressValue,
ProgressTrack,
ProgressIndicator,
} from "@/components/ui/progress";
<Progress value={50}>
<ProgressTrack>
<ProgressIndicator />
</ProgressTrack>
// [!code highlight]
<ProgressValue>{(formattedValue, progress) => `${progress} lbs`}</ProgressValue>
</Progress>
ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā