BDMG UI

Progress Bar

Progress indicators in seven styles: bar with percentage, inline label, compact, step segments, label above bar, stepper with labels, and a minimal full-width strip (type 7).

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
  • 7 – Minimal strip: full width, ~4px tall, square corners, no labels. Progress is (currentStep / totalSteps) × 100. Use foregroundColor / backgroundColor for fill and track (defaults follow theme).
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

Type 7 (minimal strip)

Flush to the top of a container: no labels, flat two-tone bar, square edges. Typical pairing: overflow-hidden on the card and rounded-* on the outer wrapper.

tsx
<div className="overflow-hidden rounded-xl border bg-card max-w-xl shadow-sm">
  <ProgressBar
    type="7"
    currentStep={1}
    totalSteps={8}
    foregroundColor="#F5820D"
    backgroundColor="#FFEAD2"
  />
  <div className="p-6">
    <p className="font-semibold text-foreground">Current Monthly Power Bill</p>
  </div>
</div>

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" | "7""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.