loadsv
Loading indicators for Svelte, made to sit inside your UI.
All 28 spinnersInstallation
npm install loadsv Usage
Import a spinner and drop it in. It takes the text color around it.
<script> import { Arc } from 'loadsv';</script><Arc /><Arc size={32} color="#ff3e00" /> In a button
Swap the label for a spinner while the action runs. The button keeps its width.
<button disabled={saving}> {#if saving}<Arc size={14} />{/if} {saving ? 'Saving…' : 'Save changes'}</button> In a field
Check while they type. A small spinner at the end of the field says the app heard them.
@
@pedro is available.
<input bind:value={handle} oninput={check} />{#if checking}<Ring size={14} />{/if} In a toast
For work that happens somewhere else. Say what’s running, then say that it’s done.
<div role="status" class="toast"> <Snake size={16} /> Deploying loadsv-docs</div> While someone’s typing
Or something. Ask a question and watch the reply get written.
- What’s new in loadsv?
- Sixteen new spinners, 28 in all. Snake is the only one that repaints.
{#if typing} <div class="bubble" aria-label="Assistant is typing"> <BouncingDots size={20} /> </div>{/if} When a whole panel waits
Give the spinner room, and a sentence saying what it’s waiting for.
Invoices
Fetching invoices…
{#await invoices} <Blocks size={28} /> <p>Fetching invoices…</p>{:then rows} <InvoiceList {rows} />{/await} Every spinner
Hover one to play it. Each has its own page with a playground and every option.
- Arc 800ms
- Atom 1200ms
- Blocks 1200ms
- Bounce 900ms
- Bouncing dots 1000ms
- Circular dots 800ms
- Classic 1000ms
- Clock 1000ms
- Comet 800ms
- Dual 1000ms
- Eclipse 1400ms
- Flip 1600ms
- Handoff 1800ms
- Hourglass 4000ms
- Inchworm 2000ms
- Infinity loop 1600ms
- Leap 1500ms
- Linear dots 1000ms
- Newton’s cradle 1200ms
- Pulse 1200ms
- Ribbon 1600ms
- Ring 800ms
- Ripple 1800ms
- Slide 2400ms
- Snake 1500ms
- Spark 1400ms
- Swirl 1000ms
- Wave 1000ms