WlPill

Compact status label.
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 status color.

label

Text (when no slot is provided).

Display a compact status dot.

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

Example

In progress
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 { WlPill } from "legato-ui";
</script>

<template>
  <div class="wl-stack" data-space="md">
    <WlPill label="In progress"  />
  </div>
</template>

Five statuses

Neutral/info/ok/warn/err, label and a custom default slot with a decorative icon.

DraftReleaseIn progressDoneNeeds reviewError
Default-slot content:Reviewed by the team

A status displays a state and performs no action. Its label is understandable without color.

Vue SFC · additional example
<script setup lang="ts">
import { WlIcon, WlPill, type WlTone } from "legato-ui";
const labels = { neutral: "Draft", accent: "Release", info: "In progress", success: "Done", warning: "Needs review", danger: "Error" } satisfies Record<WlTone, string>;
</script>

<template>
  <div class="wl-stack" data-space="lg">
    <div class="wl-inline" data-space="sm"><WlPill
      v-for="(label, variant) in labels"
      :key="variant"
      :label="label"
      :tone="variant"
    /></div>
    <div class="wl-inline" data-space="sm">
      <span class="wl-text-body">{{ "Default-slot content:" }}</span>
      <WlPill tone="success"><WlIcon name="check" :size="12" />{{ "Reviewed by the team" }}</WlPill>
    </div>
    <p class="wl-text-small wl-text-muted">{{ "A status displays a state and performs no action. Its label is understandable without color." }}</p>
  </div>
</template>