Progress
Determinate or indeterminate progress, as a linear bar or a circular ring.
62%
import { Progress, VStack } from "astralis-ui";
export function ProgressDemo() {
return (
<VStack gap="5" alignItems="stretch" className="astralis:w-full astralis:max-w-md">
<Progress value={30} size="sm" />
<Progress value={62} showValueLabel />
<Progress value={88} size="lg" colorScheme="green" />
<Progress />
</VStack>
);
}Import#
import { Progress } from "astralis-ui";Circular#
62%
88%
import { HStack, Progress } from "astralis-ui";
export function ProgressCircle() {
return (
<HStack gap="8" alignItems="center">
<Progress shape="circle" value={25} size="sm" />
<Progress shape="circle" value={62} showValueLabel />
<Progress shape="circle" value={88} size="lg" colorScheme="purple" showValueLabel />
<Progress shape="circle" />
</HStack>
);
}Props#
| Prop | Type | Default | Description |
|---|---|---|---|
value | number | — | Current progress. Omit entirely for indeterminate. |
max | number | 100 | The value that counts as 100%. |
shape | "line" | "circle" | "line" | Bar or ring. |
size | "sm" | "md" | "lg" | "md" | Bar height / ring diameter. |
colorScheme | all 11 schemes | "brand" | Hue of the filled portion. |
showValueLabel | boolean | false | Percentage text (hidden while indeterminate). |
Accessibility#
- Renders
role="progressbar"witharia-valuemin/max/nowand a percentagearia-valuetext; indeterminate mode omitsaria-valuenow, which is the standard ARIA signal for "busy, duration unknown". - Give each bar an accessible name (
aria-label="Uploading photos") when more than one is on screen.