Skip to main content

Common Examples

import { ProgressBar } from "@servicetitan/anvil2";

function ExampleComponent() {
  return (
    <ProgressBar
      label="50% Completed"
      value={50}
      description="Description for Progress Bar"
    />
  );
}

Progress bar fill percentage

Progress bars show a completed state when the value is equal to the max value, which is 100 by default. Otherwise, the value is divided by the max to determine what percentage the bar should be visually filled to.

Showing indeterminate progress bars

If the indeterminate prop is set to true, the progress bar will show an animation to signal to the user that the progress has not been determined.

Progress bar error state

Use the error prop to show an error state. If a string is provided to the error prop, a message will also be displayed.
Last modified on January 23, 2026