UnflowUI
Components

Progress

A determinate progress indicator, linear or circular, with an auto-generated percentage label or status icon.

Overview

Progress renders a determinate progress bar — linear or circular — driven by a value/max pair. It auto-generates a percentage label (or, once a status is set, swaps the label for a success/error icon), and exposes slots/slotProps for full control over the label, icon, track, and indicator.

Import

import { Progress } from '@unflow.io/ui/components/Progress';

Props

PropTypeDefaultDescription
valuenumberRequired. Current value, relative to max
maxnumber100Upper bound value is measured against
type'linear' | 'circular''linear'Renders a circular indicator instead of the default linear bar
status'success' | 'error'Tints the indicator and swaps the label for a status icon
hideLabelbooleanHides the auto-generated label/icon
size'xs' | 'sm' | 'md' | number'sm'Preset size token, or a custom size in px. Controls the diameter when type is circular, and the bar height when type is linear
thicknessnumbersize preset's thicknessStroke width in px. Only used when type is circular
roundedIndicatorbooleantrueRounds the indicator's stroke ends. Only used when type is circular
capPercentagenumberRestricts the track and indicator to a gauge-style arc spanning this percentage (0-100) of the full circle, leaving a gap centered at the bottom so the ring never fully closes. Only used when type is circular

Basic usage

65%

<Progress value={65} />

Circular

Set type="circular" to render a ring instead of a bar. size controls the diameter and accepts the same preset tokens (xs/sm/md) or a custom pixel value.

65%

<Progress type="circular" value={65} size="md" />

Status

Setting status tints the indicator and swaps the percentage label for a status icon, on both linear and circular variants.

<Progress value={100} status="success" />
<Progress value={75} status="error" />
<Progress type="circular" value={100} status="success" size="md" />
<Progress type="circular" value={75} status="error" size="md" />

Capped gauge

capPercentage restricts a circular indicator to a gauge-style arc, leaving a gap at the bottom so the ring never fully closes — even once value reaches max.

75%

<Progress type="circular" value={75} size="md" capPercentage={80} />

Customization (slots & slotProps)

SlotTypeDescription
label(percentage: number, status: ProgressStatus | undefined) => ReactNodeOverrides the auto-generated percentage label
icon(status: ProgressStatus) => ReactNodeOverrides the auto-generated status icon shown once status is set
Slot PropPropsDescription
trackBaseHTMLProps<HTMLDivElement>The background track element
indicatorBaseHTMLProps<HTMLDivElement>The filled indicator element
labelBaseHTMLProps<HTMLParagraphElement>The label element

Accessibility

  • The track carries role="progressbar" with aria-valuenow, aria-valuemin={0}, and aria-valuemax (mirroring max), so assistive tech reports progress without extra wiring.
  • The percentage label is purely visual text — aria-valuenow is what screen readers announce, so hiding the label via hideLabel doesn't remove any accessible information.