Components / Data display
ProgressCircle
Ring progress, e.g. "7 of 10 stamps".
import { ProgressCircle } from "@stylhero/ui";
Example
Code
import { ProgressCircle, Stack } from "@stylhero/ui";
function ProgressCircleExample() {
return (
<Stack direction="row" gap={6}>
<ProgressCircle value={72} label="Profile complete">72%</ProgressCircle>
<ProgressCircle value={3} max={5} tone="success" label="Steps done">3/5</ProgressCircle>
</Stack>
);
}
Props
| Prop | Type | Default | Description |
|---|---|---|---|
value required |
number |
- | |
children |
ReactNode |
- | Text in the middle; defaults to the percentage. |
label |
string |
- | |
max |
number |
100 |
|
size |
number |
64 |
Diameter in px. |
tone |
"primary" | "success" | "accent" |
"primary" |
Also takes every <div> attribute (id, style, data-*, aria-*, event handlers…), passed to that element.
Accessibility
role="progressbar"labelled withlabel.
Generated from src/components/Progress.tsx. Something wrong or missing? Open an issue.