Skip to content

Search documentation

Search guides, examples, and component APIs.

Quick links
↑↓ NavigateEnter OpenEsc Close
Get started

Documentation navigation

Components / Display

Spinner

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.

Interactive showcase

Publishing release

Step 3 of 4

Install

Run in your project
bunx --bun @getweini/cli@latest add spinner

Start with this example

Import 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.

Vue
<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.

When to use it

Short action

Indicate that a save or refresh is working inside its button.

Loading section

Pair motion with text while one dashboard section refreshes.

More examples

Saving button

Keep the visible action text and busy state together.

Saving button
<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>

Results loading

A labelled spinner can stand alone when the text cannot fit beside it.

Results loading
<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>

Complete API

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.

Spinner

Complete API for Spinner
NameType or signatureDefaultWhat it does
sizeprop"sm" | "md" | "lg" | undefined"md"Choose the visual size. Medium is the usual default where available.
labelpropstring | undefinedNot setVisible or accessible name for this item.
Public type definitions
Public types
// packages/frameworks/vue/components/spinner/types.ts
// ------- TYPES -------

export interface SpinnerProps {
  size?: 'sm' | 'md' | 'lg'
  label?: string
}

Implementation notes

  • Prefer Progress when a measurable completion value is available.
  • Keep the loading indicator scoped to the content or action that is waiting.

Accessibility and localization

  • Without label, Spinner is decorative; use visible text or label its containing region.

Source contract and editing guidance