Skip to content
Stylhero 0.8.0
Components

Core

Layout and type

Inputs

Overlays

Navigation

Data display

Charts

Transitions and utilities

Page pieces (landing pages, portfolios, docs)

Icons

Components / Data display

Progress

Linear progress bar.

import { Progress } from "@stylhero/ui";

Example

Code
import { Progress, Stack } from "@stylhero/ui";

function ProgressExample() {
  return (
    <Stack gap={4}>
      <Progress label="Uploading" value={64} valueText />
      <Progress label="Checking prices" tone="accent" />
    </Stack>
  );
}

Props

PropTypeDefaultDescription
label ReactNode -
max number 100
tone "primary" | "success" | "accent" "primary"
value number - 0 to max. Leave out for an indeterminate (moving) bar.
valueText boolean | string - Show "40%" (or a custom string) next to the label.

Also takes every <div> attribute (id, style, data-*, aria-*, event handlers…), passed to that element.

Accessibility

  • role="progressbar" with aria-valuenow, -min and -max; without value it's indeterminate.

Generated from src/components/Progress.tsx. Something wrong or missing? Open an issue.