WlSpinner
Loading indicator (role=status).
Components / Feedback v0.1.0
Appearance
size
md
Full example
<div class="wl-stack" data-space="md">
<div
class="wl-inline"
style="padding: var(--wl-space-md); border-radius: var(--wl-radius-sm)"
:style="{ background: props.preview?.light ? 'var(--wl-action-primary-bg)' : 'var(--wl-bg-soft)' }"
>
<WlSpinner label="Loading material" />
</div>
</div>Sizes, light variant and loading
Sm/md/lg, light on a dark surface, clear labels and controlled completion/retry.
Loading materials…
Full example
<script setup lang="ts">
import { WlButton, WlSpinner } from "legato-ui";
import { ref } from "vue";
const busy = ref(true);
</script>
<template>
<div class="wl-stack" data-space="lg">
<div class="wl-inline" data-space="lg">
<WlSpinner size="sm" label="Small loading indicator" />
<WlSpinner size="md" label="Medium loading indicator" />
<WlSpinner size="lg" label="Large loading indicator" />
<span class="showcase-spinner-dark">
<WlSpinner light label="Light indicator on a dark background" />
</span>
</div>
<div class="wl-inline" data-space="sm">
<WlSpinner v-if="busy" label="Loading materials" />
<span>{{ busy ? "Loading materials…" : "Materials ready." }}</span>
</div>
<div><WlButton @click="busy = !busy">{{ busy ? "Finish loading" : "Retry upload" }}</WlButton></div>
</div>
</template>
<style scoped>
.showcase-spinner-dark {
display: inline-flex;
padding: var(--wl-space-md);
border-radius: var(--wl-corner-control);
background: var(--wl-action-primary-bg);
}
</style>Props
Types, accepted values and literal defaults come from the public manifest. Inherited settings name their source; “Not set” means no default is declared.
| Prop | Type / values | Default | Purpose |
|---|---|---|---|
size | WlSpinnerSize | "md" | Size. |
light | boolean | false | Light variant for dark backgrounds. |
label | string | Not set | Uses locale.loading when omitted or undefined; English fallback: Loading. |
Events
No public events.
Slots
No public slots.
Keyboard and accessibility
- Label gives role=status its accessible name; specify what is loading.
- Light is intended for dark backgrounds, and size must not be the only way to convey meaning.
- Describe results and available actions alongside completion or errors; the spinner does not manage requests itself.
Keyboard and application responsibilities
Provide a meaningful accessible name and connect labels, hints and errors to the focusable element. Check the behavior with your own data and a screen reader.
WAI-ARIA Authoring PracticesIn your application, check keyboard controls, zoom and focus visibility. State labels and required information must be readable in every theme.