Vanilla Breeze

status-wc

Visual state indicator: live, recording, streaming, presence (online/away/busy/offline), system state (running/paused/stopped/error). Variant drives color + animation.

Overview

<status-wc> is a presentational primitive that shows the current ongoing state of an entity — a stream, a user, a process, a service. The variant attribute drives color and animation; CSS handles all rendering; prefers-reduced-motion collapses pulse to a steady dot.

When to use which primitive

Three adjacent VB primitives sit in this neighborhood. Pick the one that matches the shape of what you're showing.

Use thisWhen
<status-wc>Steady visual indication of an ongoing state — live/recording/online/offline/error. A dot you'd leave on screen indefinitely.
<status-message>One-shot prose announcement: Form submitted. Saved. Inline text, not a persistent badge.
<notification-wc>Action-bearing banner or panel with stewardship, dismissal, history.
<toast-msg>Transient feedback that dismisses on its own.

Built-in variants

Eleven variants ship out of the box, grouped by intent:

VariantColorAnimationIntent
live, recording, errorerror / redpulseActive broadcast / recording / failed.
streamingwarning / amberpulseIn-flight stream.
onlinesuccess / greensteadyAvailable / reachable.
runningsuccess / greenpulseActive process.
away, pausedwarning / ambersteadyIdle / suspended.
busyerror / redsteadyReachable, do not disturb.
offline, stoppedmuted / graysteadyUnreachable / halted.

Sizes

Position

data-position controls where the dot sits relative to the label.

Bare dot: data-position="only" visually hides the label but keeps it for screen readers. Required: aria-label or slot text content.

Pulse override

Force or suppress the pulse independent of the variant's default.

Custom variants (CSS-only)

Add a CSS rule. No JS change needed — the component reflects data-variant to CSS and any matching rule wins.

Composition

Compose with other VB primitives rather than baking layouts into the component.

Accessibility

  • Default role="status" with aria-live="polite" — screen readers announce variant changes.
  • Set data-live="off" for decorative use (e.g., dashboards with many static indicators) — this removes the role and live-region.
  • prefers-reduced-motion: reduce collapses pulse to a steady dot; color still conveys state.
  • Never color-only: every variant ships with a default text label. Use data-position="only" with aria-label for bare-dot situations.

Attributes

AttributeTypeDefaultDescription
data-variantstringBuilt-in variant name or custom (see above).
data-sizestringmdxs | sm | md | lg
data-positionstringbeforebefore | after | only
data-pulsestringvariant defaulton | off
data-livestringpoliteSet to off to suppress announcements.
aria-labelstringRequired when slot has no text.

CSS properties

PropertyDefaultPurpose
--status-dot-size0.625remDot diameter (overrides data-size).
--status-dot-colorvariant-defaultDot color (overrides variant default).
--status-pulse-duration2sPulse cycle duration.
--status-animationvariant-defaultDirect animation shorthand override.
--status-gap--size-2xsGap between dot and label.

Events

EventBubblesWhen
status-wc:changeyesdata-variant mutates. detail: { variant, previousVariant }.

See also