WlProgress

Linear progress bar from 0 to 100%.
Components / Data v0.1.0

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

Settings

tone

Semantic progress color.

value

Percentage 0–100.

max
Not set

Positive finite upper bound; invalid values fall back to 100.

ariaLabel

Accessible name when no external label is referenced.

Thin bar.

Show the percentage.

Show activity without exposing a known current value.

Props pt, ariaLabelledby, models, handlers and slots can be edited in the SFC. See their descriptions in API.

Example

65%
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 { WlProgress } from "legato-ui";
</script>

<template>
  <div class="wl-stack" data-space="md">
    <WlProgress
      :value="65"
      show-value
      aria-label="Material completion"
      
    />
  </div>
</template>

Regular, thin and completed progress

Default/ok, thin, showValue, accessible names, changing values and restart.

40%

Prepared: 40%.

Vue SFC · additional example
<script setup lang="ts">
import { WlButton, WlProgress } from "legato-ui";
import { ref } from "vue";
const value = ref(40);
</script>

<template>
  <div class="wl-stack" data-space="lg">
    <WlProgress :value="64" aria-label="Default progress" />
    <WlProgress :value="32" thin aria-label="Thin progress" />
    <WlProgress :value="100" tone="success" aria-label="Completed operation" />
    <WlProgress
      :value="value"
      :tone="value === 100 ? 'success' : 'accent'"
      show-value
      aria-label="Local preparation progress"
    />
    <div class="wl-inline" data-space="sm">
      <WlButton size="sm" :disabled="value === 100" @click="value = Math.min(100, value + 20)">
        {{ "Add 20%" }}
      </WlButton>
      <WlButton size="sm" variant="ghost" @click="value = 0">{{ "Start again" }}</WlButton>
    </div>
    <p class="wl-text-small" role="status">
      {{ value === 100 ? "Preparation completed." : "Prepared: " + value + '%.' }}
    </p>
  </div>
</template>