Progress
Displays a value indicating completion of a task.
Progress renders role="progressbar" with determinate or indeterminate state. It supports horizontal and vertical orientations.
Anatomy
#indicator: Filled portion of the track.
Usage
Examples
Custom indicator
Use #indicator to render your own fill element using the exposed percentage.
@layer akaza-reset;
@import "tailwindcss";
@import "akaza-ui/dist/akaza-ui.css";
Indeterminate state
Set the model value to null to indicate an unknown duration.
<template>
<Avatar
src="/avatar.jpg"
alt="Jane Doe"
text="JD"
:delay-ms="300"
/>
</template>
Custom range
Use min and max when progress is measured on a scale other than 0 to 100.
<Button
:ui="{
root: 'rounded-md bg-black px-3 py-2 text-white',
spinner: 'size-4 animate-spin',
}"
>
Save
</Button>
Custom value label
Use get-value-label to provide a clearer screen reader value.
<template>
<Button
as="a"
href="/docs"
>
Read the docs
</Button>
</template>
Vertical orientation
Use vertical orientation when progress should match a vertical layout.
<template>
<Button
disabled
focusable-when-disabled
>
Restricted
</Button>
</template>
Value Bounds
Finite values are clamped to the effective bounds for ARIA, slots, percentage, and completion state without rewriting the model. A null or non-finite value is indeterminate. A non-finite minimum falls back to 0; an invalid maximum falls back to the effective minimum plus 100.
API Reference
Props
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | number | null | null | Current progress value. null = indeterminate. |
min | number | 0 | Minimum value. |
max | number | 100 | Maximum value. |
orientation | "horizontal" | "vertical" | "horizontal" | Orientation of the progress bar. |
ariaLabel | string | — | Accessible label when no visible label is present. |
getValueLabel | (value: number | null, max: number) => string | — | Custom function to generate the aria-valuetext. |
ui | ProgressUi | — | CSS class overrides. |
Slots
| Slot | Scoped props | Description |
|---|---|---|
indicator | { value, percentage, max, min, state } | The filled indicator element. state is "indeterminate" when value is null. |
UI Options
| Key | Description |
|---|---|
root | The outer track element. |
indicator | The fill indicator element. |
Styling Hooks
| UI key | CSS class | Data attrs |
|---|---|---|
root | akaza-progress | data-akaza-state, data-akaza-orientation |
indicator | akaza-progress-indicator | data-akaza-state |
When value is determinate, root also sets --akaza-progress-percentage to a clamped percentage.