Skip to content

Loading Progress

Waiting with completion feedback: the system is working and the interface reports how far along it is — a percentage, a byte count, a file count, an expectation of when it ends. It reuses the Progress anatomy (bar and ring) and the bar variant of Loading Spinners, adding the label / value / detail line.

The split with Progress is about who drives the value: here the system does (downloads, uploads, exports, syncs) — the user waits. When the value advances because the user acts (steps completed, achievements), that is Progress, which lives under Data and is determinate by design.

Indeterminate waiting (a bar that sweeps, no value yet) belongs here too — the card examples in the demo show the indeterminate → determinate pair.

<script>
import Loading from "@invisible-ui/svelte/Loading.svelte";
import Progress from "@invisible-ui/svelte/Progress.svelte";
</script>

Bar loaders are the bar variant of Loading:

PropTypeDefaultDescription
variant"dots" | "spinner" | "bar" | "typing" | "morph""dots"Indicator shape: pulsing dots or a rotating spinner arc.
valuenumber | nullnullCompletion percentage (0–100) for the bar variant: the bar becomes determinate (a fill that grows to done) and exposes progressbar semantics. Leave null for the indeterminate sliding segment.
labelstring | undefinedundefinedAccessible name announced by the status role.
showLabelbooleanfalseAlso render the label as visible text next to the indicator.
showValuebooleanfalseShow the percentage (from value) as visible text.
detailstring | undefinedundefinedExtra visible detail, e.g. "3 of 8 files" or "48 MB of 128 MB".
decorativebooleanfalseHide from assistive tech (the surrounding region announces the state).
statusstring | undefinedundefinedLive status message — a running description of what the process is doing ("Connecting…", "Fetching records…", "Rendering…"). Unlike label (a static accessible name), this renders as visible text **inside** the polite role="status" region and is announced on every change, so a succession of backend-reported steps is read out as it progresses. The region is aria-atomic, so each new message is announced in full. Ignored on a determinate bar (a progressbar announces its value, not free text) and when decorative.
delaynumber0No-flash delay (ms): keep the indicator hidden until this long has passed, so a fast operation never flashes a loader. If the component is removed before the delay elapses, nothing is ever shown. Follows the response-time rule — reveal a loader only once a wait is actually noticeable. Default 0 (shown immediately).
overlaybooleanfalseRender as a centered overlay filling the nearest positioned ancestor — the built-in busy-region pattern. Mark that region aria-busy="true".
veilbooleantrueWith overlay: paint a translucent backdrop that also blocks pointer interaction while busy. Set false to overlay just the indicator (no dim, no pointer blocking) — e.g. over a control whose own modal already guards interaction.
  • Determinate bars are progressbars with aria-value*; the value is announced via aria-valuetext as it changes.
  • The indeterminate bar announces as busy without a value — use it only until a value is known, then switch to the determinate form.
  • Per the response-time guidance: past ~10 s the user needs a determinate bar with a percentage or detail, and ideally a way to cancel.
<Loading variant="bar" value={percent} showLabel showValue label="Downloading" />
<Progress shape="circle" value={percent} showValue label="Uploading photo" />