Skip to main content

Progress

The Progress component visualizes the completion status of a task or process. It supports both determinate progress (with a known value) and indeterminate progress (ongoing process without a known completion time).

Import

Anatomy

The Progress component consists of five parts:
  • <Progress.Root> - The container that provides context
  • <Progress.Track> - The background track
  • <Progress.Indicator> - The filled portion showing progress
  • <Progress.Label> - A label for the progress bar
  • <Progress.Value> - Displays the formatted value

Basic Usage

Key Features

  • Determinate and indeterminate states: Show specific progress or ongoing activity
  • Accessible: Uses ARIA progressbar role
  • Formatted values: Automatic number formatting with Intl.NumberFormat
  • Status tracking: Automatically tracks indeterminate, progressing, and complete states
  • Locale support: Format numbers according to user locale
  • Unstyled: Complete styling control

Component Props

Root

The root container that manages the progress state and provides accessibility attributes. Props:
  • value (number | null, required): The current progress value. Use null for indeterminate state
  • min (number): The minimum value (default: 0)
  • max (number): The maximum value (default: 100)
  • format (Intl.NumberFormatOptions): Options to format the value
  • locale (Intl.LocalesArgument): The locale for number formatting
  • getAriaValueText (function): Custom function to generate aria-valuetext
  • Renders a <div> element with role=“progressbar”
State:
  • status: One of ‘indeterminate’, ‘progressing’, or ‘complete’

Track

The background track of the progress bar. Props:
  • Renders a <div> element
  • Accepts all standard HTML div attributes

Indicator

Visualizes the completion status of the task. Props:
  • Renders a <div> element
  • Width is automatically set based on the value
  • Accepts all standard HTML div attributes

Label

A label for the progress bar. Props:
  • Renders a <label> element
  • Automatically associates with the progress bar for accessibility

Value

Displays the formatted current value. Props:
  • Renders a <span> element
  • Automatically displays the formatted value

Styling

Common Patterns

Indeterminate Progress

Use null as the value for indeterminate progress:

Status-Based Styling

Style based on the progress status:

Animated Progress

Percentage Display

Circular Progress

Multi-Step Progress