0.7.4 gives the Ambient pack weather. A page names one feed URL on its own site, and the pack sets data-weather from it, uses its sunrise and sunset for dawn and dusk, and never shows a stale observation. Helpers for producing the feed from Open-Meteo are included. Ambient p…
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 this
When
<status-wc>
Steady visual indication of an ongoing state — live/recording/online/offline/error. A dot you'd leave on screen indefinitely.
Bare dot:data-position="only" visually hides the label but keeps it for screen readers. With no slot text, the component renders the variant's default label (see Accessibility), so a bare dot is never colour-only.
Pulse override
Force or suppress the pulse independent of the variant's default.
Add a CSS rule. No JS change needed — the component reflects data-variant to CSS and any matching rule wins. Give a bare custom variant a hidden label with data-label-<variant> (it otherwise falls back to the variant name).
Never colour-only. When the element has no slot text, it renders a visually hidden default label for the variant (Online, Busy, Recording…). Override it per variant with data-label-<variant> (for example data-label-online="En ligne") or give an explicit aria-label.
Live region by default. The element gets role="status" and aria-live="polite" unless you set your own role/aria-live or data-live="off".
What is announced. Live regions announce text changes, not attribute or colour changes. With the generated default label, changing data-variant changes that text, so the new state is announced. With your own slot text, a variant change alone is silent — update the text too. Content present at page load is not announced.
Set data-live="off" for decorative use (e.g. dashboards with many static indicators) — this removes the role and live region.
In light mode the dot has a darker 1px ring so light fills (amber streaming/away/paused) keep 3:1 against the surface. In forced-colours mode the dot is painted with system colours (solid, hollow for offline/stopped).
prefers-reduced-motion: reduce collapses pulse to a steady dot.