Preview

25100
75100

Installation

<> import.ts
import { ProgressBar } from "@/components/ui/progress-bar"

Code

<> component.tsx
import { ProgressBar } from "@/components/ui/progress-bar"

<ProgressBar />

API Reference

ProgressBar

Linear or scroll progress indicator with labels, animation and colors.

<> import.ts
import { ProgressBar, ProgressBarPresets } from "@/components/ui/progress-bar"

Props

PropTypeDefaultDescription
value
number0Current value (0-100 when max=100)
max
number100Maximum value
size
"sm" | "md" | "lg""sm"Bar height and text size
type
"linear" | "scroll""linear"Render mode
color
stringTailwind color name or hex
backgroundColor
stringTailwind color name or hex
showLabel
booleanfalseShow text label
label
stringCustom label text
showPercentage
booleanfalseShow percentage value
animated
booleanfalseAnimate bar fill
striped
booleanfalseStriped background
scrollProgress
booleanfalseTrack page scroll as value
className
string""Additional CSS classes