Progress
Installation
npx @mielui/svelte add progressyarn dlx @mielui/svelte add progressbunx @mielui/svelte add progressUsage
Pass value for completed work and max for the total, which defaults to 100. Use indeterminate when the amount remaining is unknown. Use aria-label or aria-labelledby to name the task.
Fractional values are supported. Invalid maximums fall back to 100, and non-finite values display zero. Indicator transitions respect reduced motion. The indeterminate animation pauses when motion is disabled, the indicator leaves view, or the page is hidden.
<script lang="ts">
import { Progress } from '@mielui/svelte/components/progress';
</script>
<Progress value={28} aria-label="Upload progress" />
<Progress indeterminate aria-label="Waiting for a response" />Examples
Simulated upload
The bar, the percentage and the status line follow one value as a transfer runs.
Simulated transfer. No files leave your device.
Determinate
Indeterminate
Waiting for a response
With label
API reference
Progress
Displays progress toward a value.
valuenumberCompleted amount.
Default
0maxnumberAmount that counts as complete.
Default
100indeterminatebooleanShows activity when the amount is not known.
Default
false
pnpm dlx @mielui/svelte add progress