Progress
FeedbackA bar showing how far a task has come: value out of max (100 by default), announced as a progressbar. With no value (or null) it shows that the task is running without knowing how far. Name it with aria-label or aria-labelledby.
import { Progress } from '@limerdev/zest'; Use for
An upload, an import or an export the user waits for.
Don't
A measurement within a range, such as hours used of a budget or a score: use
Meter. A long wait without a label saying what is happening.Examples
Basic
A label says what is happening; without a value the bar shows work in progress.
Importing hours · 12%
Syncing with the API
<script lang="ts">
import { Progress } from '@limerdev/zest';
let value = $state(12);
$effect(() => {
const timer = setInterval(() => (value = value >= 100 ? 0 : value + 4), 400);
return () => clearInterval(timer);
});
</script>
<div class="grid w-full max-w-sm gap-4">
<div class="grid gap-2">
<p id="import-label" class="text-sm font-medium">Importing hours · {value}%</p>
<Progress {value} aria-labelledby="import-label" />
</div>
<div class="grid gap-2">
<p id="sync-label" class="text-sm font-medium">Syncing with the API</p>
<Progress value={null} aria-labelledby="sync-label" />
</div>
</div> Props
Every part also takes class (merged over its defaults), ref (bindable: the element), children, and child (a snippet that
renders your own element, with props to spread on it).
Progress
| Prop | Type | Default | Description |
|---|---|---|---|
| max | number | 100 | The maximum value of the progress bar. |
| min | number | 0 | The minimum value of the progress bar. |
| value | number | null | 0 | The current value of the progress bar. If null, the progress bar will be in an indeterminate state. |