Progress Bar @astryx-svelte/core v0.3.0 · ProgressBar

Usage

A horizontal bar showing the completion progress of a task. Use it for operations where the duration is known, or as an animated indicator when progress can't be calculated. Supports semantic color variants, value labels, and custom formatting.
ts
import { ProgressBar } from '@astryx-svelte/core';

Best practices

GuidancePractices
DoUse a determinate bar when the total amount of work is known, and indeterminate when it's not.
DoChoose a color variant that matches the context: accent for general progress, success for completion, warning or error for alerts.
DoAlways provide a label, even if hidden; screen readers need it to announce what's loading.
Don'tPlace icons or labels inside the bar; compose them alongside it using layout components.
Don'tUse a progress bar for instant actions; it's meant for operations that take noticeable time.
Don'tUse multiple progress bars stacked together for the same operation; use one bar with a value label instead.

Examples

Common configurations, variations, and states.
ProgressBar — Custom Format
Progress bar with a custom value label showing disk usage in GB.
ProgressBar — Indeterminate
Indeterminate progress bar for operations with unknown duration.
ProgressBar — Semantic Variants
All semantic color variants stacked vertically.
ProgressBar — With Value Label
Progress bar with its current percentage displayed.