| title | Progress |
|---|---|
| description | Displays the completion progress of a task. |
| source | packages/raystack/components/progress |
| tag | new |
import { playground, directUsageDemo, variantDemo, customizationDemo, animatedDemo, withLabelsDemo } from "./demo.ts";
Import and assemble the component:
import { Progress } from '@raystack/apsara'
{/* Direct usage — renders track automatically */}
<Progress value={40} />
{/* Composable usage */}
<Progress value={40}>
<Progress.Label>Uploading...</Progress.Label>
<Progress.Value />
<Progress.Track />
</Progress>The main container for the progress. Renders a default track when no children are provided. Set value to null for an indeterminate state.
Displays a label for the progress.
Displays the formatted current value as a percentage.
Contains the indicator that visualizes the current value.
The progress supports linear and circular variants.
The simplest way to use the progress. When no children are provided, it renders the track automatically.
Customize the track for both variants. For linear, use height on the track. For circular, use width/height on the track to control the overall size and --rs-progress-track-size to control the stroke thickness.
Use controlled value to animate the progress indicator.
Compose with Progress.Label and Progress.Value for additional context.
- Uses the
progressbarARIA role - Sets
aria-valuenow,aria-valuemin, andaria-valuemaxattributes - Supports indeterminate state when
valueisnull - Supports
aria-labelandaria-valuetextfor screen readers