BDMG UI

Progress Bar

Progress indicators in six styles: bar with percentage, inline label, compact, step segments, label above bar, and stepper with labels.

Installation

tsx
import { ProgressBar } from "@workspace/ui/components/progress-bar"

Basic usage

Pass currentStep and totalSteps. Progress is computed as (currentStep / totalSteps) * 100.

tsx
<ProgressBar type="1" currentStep={2} totalSteps={4} />
50% Complete

Types

  • 1 – Bar with percentage below; optional icon and topSlot
  • 2 – Bar with label inside the fill
  • 3 – Compact bar with percentage to the right
  • 4 – Segmented steps (blocks)
  • 5 – Label above the bar
  • 6 – Stepper with circles and optional stepLabels
tsx
<ProgressBar type="2" currentStep={4} totalSteps={5} />
<ProgressBar type="4" currentStep={2} totalSteps={5} />
<ProgressBar
  type="6"
  currentStep={1}
  totalSteps={3}
  stepLabels={["Details", "Review", "Pay"]}
/>
80%
Step 2 of 5
1
Details
2
Review
3
Pay

With icon (type 1)

tsx
<ProgressBar
  type="1"
  currentStep={2}
  totalSteps={4}
  icon={<Check className="size-5 text-primary-foreground" />}
/>
50% Complete

Props

PropTypeDefaultDescription
type"1" | "2" | "3" | "4" | "5" | "6""1"Visual style (see Types section).
currentStep*number-Current step (1-based) or progress numerator.
totalSteps*number-Total steps or progress denominator.
stepLabelsstring[]-Labels for each step (used by type 6).
backgroundColorstringvar(--muted)Track/background color.
foregroundColorstringvar(--primary)Fill/active color.
iconReactNode-Icon shown on the bar (type 1).
topSlotReactNode-Content above the bar (type 1).
classNamestring-Additional CSS classes for the wrapper.