Skip to main content

ProgressBar

ProgressBar shows determinate progress from current toward total. It renders as a horizontal bar, a circular ring, or a pie, and can display the raw value or a percentage.

When to use

  • Show how far along a known-length operation is (uploads, imports, multi-step jobs).
  • Compact circular/pie indicators for dashboards and tiles.

Import

import { ProgressBar } from '@spartanfx/react';

Basic usage

current and total are required.

<ProgressBar current={7} total={10} label="Uploading" showAsPercentage />

Circle and pie styles

import { ProgressBar, ProgressBarMode } from '@spartanfx/react';

<ProgressBar
current={45}
total={100}
mode={ProgressBarMode.Circle}
size="large"
showValue
showAsPercentage
/>

<ProgressBar current={3} total={4} mode={ProgressBarMode.Pie} />

Key props

PropTypeDefaultNotes
current (required)numberCurrent value.
total (required)numberValue representing 100%.
modeProgressBarModeBarBar, Circle, or Pie.
showValuebooleanfalseShow the value inside the indicator.
showAsPercentagebooleanfalseDisplay as % instead of current/total.
size'small' | 'medium' | 'large' | 'custom'mediumSize preset (circle/pie).
labelstringLabel above the indicator.
appearanceAppearanceModelightLight or dark theming.

See the full generated reference: ProgressBar API ↗.

See also