Skip to content
Porcelana

Progress

Determinate or indeterminate progress bar in four tones.

Data & displayRadix primitive ↗

Example

Example.tsx
import { Progress } from "@porcelana/ui";

export default function Example() {
  return (
    <div style={{ display: "grid", gap: 16, maxWidth: 420 }}>
      <Progress label="Sync" value={72} />
      <Progress label="Battery" value={38} tone="warning" />
      <Progress label="Firmware update" value={null} />
    </div>
  );
}

Import

Import
import { Progress } from "@porcelana/ui";
import "@porcelana/ui/styles.css"; // once, at your app root

Props

Generated from the TypeScript types. Standard HTML attributes are passed through and not listed.

Progress

Pass `value={null}` for an indeterminate bar.

PropTypeDefaultDescription
labelrequiredstring–Accessible name, e.g. "Upload progress".
aria-labelstring–Defines a string value that labels the current element. @see aria-labelledby.
asChildboolean–Render the single child element instead, merging props and behaviour onto it.
getValueLabel((value: number, max: number) => string)–Builds aria-valuetext from (value, max).
idstring–Element id. Generated automatically when omitted.
maxnumber100Highest allowed value.
tone"primary" | "danger" | "success" | "warning"primaryBar color.
valuenumber | null–Controlled value. Use with onValueChange.

Accessibility

  • role="progressbar" with a required label and aria-valuenow; value={null} means indeterminate.
  • The animation stops when reduced motion is on.