Short action
Indicate that a save or refresh is working inside its button.
Components / Display
A compact, reduced-motion-aware loading indicator.
Last changed in version 0.13.0: Add avatar groups and chips, expand the block gallery, and improve component colors, spacing, and motion.
Publishing release
Step 3 of 4bunx --bun @getweini/cli@latest add spinnerImport the files copied by the install command, then place the component in your Vue template. The text and values in the example belong to your app; change them to fit your task.
<script setup lang="ts">
import Button from './components/ui/button/Button.vue'
import Spinner from './components/ui/spinner/Spinner.vue'
</script>
<template>
<Button disabled aria-busy="true"><Spinner size="sm" /> Saving changes…</Button>
</template>Spinner is decorative without label. Prefer visible status text and aria-busy on the surrounding region.
Indicate that a save or refresh is working inside its button.
Pair motion with text while one dashboard section refreshes.
Keep the visible action text and busy state together.
<script setup lang="ts">
import Button from './components/ui/button/Button.vue'
import Spinner from './components/ui/spinner/Spinner.vue'
</script>
<template>
<Button disabled aria-busy="true"><Spinner size="sm" /> Saving changes…</Button>
</template>A labelled spinner can stand alone when the text cannot fit beside it.
<script setup lang="ts">
import Spinner from './components/ui/spinner/Spinner.vue'
</script>
<template>
<section aria-busy="true" aria-label="Refreshing results">
<Spinner label="Loading results" />
</section>
</template>Every public prop, model, event, slot, and exposed member of the installed Vue parts is listed below. “Not set” means you can leave that value out; “Required” means you must provide it. Native HTML attributes also work where the component uses a native element.
| Name | Type or signature | Default | What it does |
|---|---|---|---|
sizeprop | "sm" | "md" | "lg" | undefined | "md" | Choose the visual size. Medium is the usual default where available. |
labelprop | string | undefined | Not set | Visible or accessible name for this item. |
// packages/frameworks/vue/components/spinner/types.ts
// ------- TYPES -------
export interface SpinnerProps {
size?: 'sm' | 'md' | 'lg'
label?: string
}