Skip to main content
Version: 1.0.3

Progress Indicator

The Progress Indicator component provides both linear and circular progress displays with support for determinate and indeterminate states, animated fills, percentage labels, and multiple label positions. It is ideal for showing loading states, task completion, or multi-step workflows.

Interactive Demo​

64%

Installation​

ignix add component progress-indicator

Usage​

Import the component:

import { ProgressIndicator } from '@ignix-ui/progress-indicator';

Linear progress​

function LinearProgressExample() {
return (
<ProgressIndicator
type="linear"
value={48}
showPercentage
animationVariant="smooth"
labelPosition="outside-right"
className="w-full max-w-md"
/>
);
}

Circular progress​

function CircularProgressExample() {
return (
<ProgressIndicator
type="circular"
value={72}
showPercentage
animationVariant="spring"
labelPosition="inside-center"
size={80}
strokeWidth={8}
/>
);
}

Indeterminate state​

function IndeterminateExample() {
return (
<ProgressIndicator
type="linear"
indeterminate
showPercentage={false}
animationVariant="smooth"
className="w-full max-w-md"
/>
);
}

Custom percentage formatting​

function CustomLabelExample() {
const format = (pct: number) => `Completed ${Math.round(pct)}%`;

return (
<ProgressIndicator
type="linear"
value={33}
showPercentage
animationVariant="spring"
formatPercentage={format}
/>
);
}

Props​

PropTypeDefaultDescription
type"linear" | "circular""linear"Determines whether the indicator is rendered as a linear bar or circular ring.
valuenumber0Progress value from 0 to 100. Ignored when indeterminate is true.
indeterminatebooleanfalseWhen true, shows an indeterminate animation with no fixed progress value.
showPercentagebooleanfalseWhen true, displays a percentage label.
labelPositionLinearLabelPosition | CircularLabelPositionbottom / inside-centerPosition of the percentage label depending on type.
ariaLabelstring"Loading" / "Progress"Accessible label for screen readers.
animationVariant"none" | "smooth" | "spring" | "bounce" | "snappy""smooth"Controls the easing style used when animating determinate progress changes.
formatPercentage(pct: number) => stringvalue => Math.round(value) + '%'Custom formatter for the percentage label.
trackClassNamestring"bg-slate-200 dark:bg-slate-800"Tailwind classes applied to the track (background).
fillClassNamestringgradient primary backgroundTailwind classes applied to the filled portion (foreground).
classNamestringundefinedAdditional classes applied to the root container.
linearHeightnumber8Height (in px) of the linear progress bar.
sizenumber64Diameter (in px) of the circular progress indicator.
strokeWidthnumber6Stroke width (in px) of the circular progress ring.

Label positions​

Linear (LinearLabelPosition)

  • top – label above the bar
  • bottom – label below the bar
  • inside-left – label inside the bar, aligned left
  • inside-right – label inside the bar, aligned right
  • inside-center – label centered inside the bar
  • outside-left – label to the left of the bar
  • outside-right – label to the right of the bar

Circular (CircularLabelPosition)

  • inside-center – label centered inside the circle
  • outside-top – label above the circle
  • outside-bottom – label below the circle
  • outside-left – label to the left of the circle
  • outside-right – label to the right of the circle

Best Practices​

  1. Use linear progress for long horizontal areas like forms or wizard steps.
  2. Use circular progress for compact loading indicators or dashboard metrics.
  3. Prefer indeterminate mode when the total duration is unknown.
  4. Use formatPercentage to align labels with your product language (e.g. "Syncing 45%").
  5. Place labels outside (outside-left/outside-right) when precise values matter and you want maximum clarity.