Skip to main content

ProgressBar

import { ProgressBar } from "@study/ui"

Result
Loading...
Live Editor
function Example() {
  const [v, setV] = useState(0.35);
  return (
    <div className="ui-stack" style={{ maxWidth: 420 }}>
      <ProgressBar value={v} label="Transcribing" tone="violett" />
      <Button size="sm" onClick={() => setV(Math.min(1, v + 0.15))}>Next</Button>
    </div>
  );
}

Light

Loading model20 %
Uploading80 %

Dark

Loading model20 %
Uploading80 %

When to use​

  • For jobs with known progress that take seconds to minutes: uploading, transcribing.
  • Progress of a course: ProgressRing. Unknown duration: Spinner.

Props​

PropTypeDefaultMeaning
label *string–What is in progress, e.g. "Transcription". Read with the percentage.
value *number–How far, from 0 to 1.
classNamestring–
showValuebooleantrueShows the percentage next to the label.
tone"blau" | "petrol" | "gruen" | "gelb" | "orange" | "rot" | "violett" | "grau"blau

Accessibility​

  • role="progressbar" with a value of 0–100 and the label as its name; the value is also there as text.