Pho Design System

Progress

Communicates how far along a task is — an upload, an install, a multi-step flow. Built on Base UI Progress, which sizes the indicator from value and announces the percentage to assistive tech. For a static measurement within a range (disk, capacity), use Meter instead.

Import

import { Progress } from "@photon-ai/pho-ui/components/progress";

Basic

Set value (0–100) on Progress.Root. Compose a header row with Progress.Label and Progress.Value.

Uploading…
x
<Progress.Root value={60}>
  <div className="flex items-center justify-between">
    <Progress.Label>Uploading…</Progress.Label>
    <Progress.Value />
  </div>
  <Progress.Track>
    <Progress.Indicator />
  </Progress.Track>
</Progress.Root>

Indeterminate

Pass value={null} when the duration is unknown — the bar shows an indeterminate state instead of a fixed fill.

x
<Progress.Root value={null}>
  <Progress.Track>
    <Progress.Indicator />
  </Progress.Track>
</Progress.Root>

Formatting the value

The range isn’t fixed to 0–100. Set max to count real units and give Progress.Value a render function to label them (“3 / 8”); getAriaValueText supplies the spoken version (“3 of 8 files uploaded”). Pass format for a locale-aware Intl.NumberFormat reading (percent, bytes) instead.

Uploading files
x
<Progress.Root
  value={3}
  max={8}
  getAriaValueText={(_, value) => `${value} of 8 files uploaded`}
>
  <div className="flex items-center justify-between">
    <Progress.Label>Uploading files</Progress.Label>
    <Progress.Value>{(_, value) => `${value} / 8`}</Progress.Value>
  </div>
  <Progress.Track>
    <Progress.Indicator />
  </Progress.Track>
</Progress.Root>

Anatomy

Props

Every part also accepts className and render (Base UI’s prop for swapping the underlying element).

Progress.Root (<div role="progressbar">)

Progress.Value (<span>)

Progress.Label (<span>), Progress.Track (<div>), Progress.Indicator (<div>) take only the common className / render; the indicator’s inline size is set by Base UI from value.

Accessibility

Best practices