Task Steps
The running step shows a spinner, and finished steps show a check. Screen readers hear one sentence per step, such as โBuilding, step 2 of 4.โ, after the step has been current for half a second.
- Queued
- Building
- Running checks
- Deploying
Installation
Copy the command below and run it in your terminal.
Usage
current is the zero-based index of the running step, and steps before it show as done. Set it to steps.length when every step has finished, or set failed to mark the current step as failed. A step's meta, such as its duration, appears once
the step is done.
Examples
Bare
- Installing dependencies
- Compiling
- Running tests
- Building bundle
Anatomy
TaskSteps - Lists steps as pending, running, done, or failed.
<script lang="ts"> import { type TaskStep, TaskSteps } from '@sivir-ui/svelte/components/task-steps'; const steps: TaskStep[] = [ { id: 'queue', label: 'Queued', meta: '0.2s' }, { id: 'build', label: 'Building', meta: '8.1s' }, { id: 'checks', label: 'Running checks', meta: '3.4s' }, { id: 'deploy', label: 'Deploying', meta: '5.0s' } ]; </script> <div class="w-full max-w-sm"> <TaskSteps {steps} current={2} label="Deploy progress" /> </div>