WlSpinner

Loading indicator (role=status).
Components / Feedback v0.1.0

Change props to see the result: the example and code use the same settings. “Reset” restores the initial values.

Settings

size

Size.

label

Uses locale.loading when omitted or undefined; English fallback: Loading.

Light variant for dark backgrounds.

Example

Focus: outside the example · pointer: outside the example

Explore the live example and copy its Vue SFC into your application. Settings on the left can be combined.

Code for your application

Vue SFC · current settings
<script setup lang="ts">
import { WlSpinner } from "legato-ui";
</script>

<template>
  <div class="wl-stack" data-space="md">
    <div class="wl-inline" style="background: var(--wl-gray-950); padding: var(--wl-space-md); border-radius: var(--wl-radius-sm)">
      <WlSpinner label="Loading material"  />
    </div>
  </div>
</template>

Sizes, light variant and loading

Sm/md/lg, light on a dark surface, clear labels and controlled completion/retry.

Loading materials…
Vue SFC · additional 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-gray-800);
}
</style>