Instruments Readout
// Readout

Readout

A scramble-decode telemetry value — text resolves from glyph noise when it changes, with optional band tint.

<talos-readout> is a text value that decodes when it changes. The resolved characters are the value exactly; a change fires a brief left-to-right scramble that resolves into the new text — so motion marks the arrival of fresh telemetry, the way a flipboard or segment display settles. A stable value is stable text. The scramble is the one idea: it is the event, not decoration.

Default

LIVE
<talos-readout value="atlas-01" label="Node"></talos-readout>

value is the displayed text exactly. label renders an uppercase HUD caption above it. Non-numeric values have no band — they render neutral foreground.

Unit

PREVIEW
<talos-readout value="1042" unit="req/s" label="Ingest"></talos-readout>

unit is appended after the resolved value at a smaller, muted size. It is not part of the scramble — only the value decodes.

Bands — warn & crit

PREVIEW
<talos-readout value="42" unit="%" warn="70" crit="90"></talos-readout>
<talos-readout value="78" unit="%" warn="70" crit="90"></talos-readout>
<talos-readout value="96" unit="%" warn="70" crit="90"></talos-readout>

When value parses as a number, warn and crit tint the text by band (inclusive-from): nominal stays foreground, warn paints --talos-warning, crit paints --talos-danger. Same threshold convention as gauge and meter.

Invert — low is bad

PREVIEW
<talos-readout value="12" unit="%" warn="40" crit="20" invert></talos-readout>
<talos-readout value="88" unit="%" warn="40" crit="20" invert></talos-readout>

invert flips the band so it trips as the value falls — for metrics where low readings are the alarm (battery, headroom, uptime margin).

Duration

PREVIEW
<talos-readout value="0300" duration="200"></talos-readout>
<talos-readout value="0800" duration="800"></talos-readout>

duration is the scramble length in ms (default 420). Under prefers-reduced-motion: reduce the scramble is skipped entirely and the new value snaps in — the meaning is the text, and a static frame is always correct.

Behaviour

All attributes are reactive — changing value fires the decode; writing the same value is a no-op (stable value, stable text). Bands apply only when value parses as a number.

Attributes

Generated from custom-elements.json in the installed package. Shared attributes (state, format, static…) behave as the instrument contract describes.

AttributeTypeDefaultDescription
value string — the value to display (string or number); missing reads "—".
warn number — numeric value at/after which band = warning.
crit number — numeric value at/after which band = critical.
invert boolean — low = bad (band trips as value FALLS)
unit string — appended after the resolved value (e.g. "%")
label string — uppercase caption above the readout.
duration number 420 scramble length in ms.
format boolean — number | compact | percent | bytes | duration | currency; the readout's number format
precision boolean — fraction digits of the formatted value
currency string — ISO 4217 code when format=currency
locale string — BCP 47 locale for formatting; defaults to the page locale
state string — live | loading | stale | offline | unknown; sets data-state on the host
updated-at string — time of the last sample (ISO or epoch ms); drives the age caption
stale-after string — seconds after updated-at at which the element reads stale
static string — boolean; turns motion off for this element only

Properties and methods

MemberTypeDescription
.value string | null The displayed value (string or number); mirrors the `value` attribute.

Events

EventTypeDescription
talos:band CustomEvent<BandEventDetail> Fired when the band changes (not on first render): detail { from, to, value }. Bubbles and is composed.

CSS parts

::part(caption), ::part(readout)