<talos-ticker> is the discrete sibling of <talos-trend>:
a scrolling log of timestamped events where severity is the colour and
arrival is the motion. A row sliding in is an event happening. The newest
arrives at the top and the oldest falls off a fixed window. It is the live
instrument for the static .talos-log markup.
Default — push()
<talos-ticker cap="6" label="events"></talos-ticker>
<script type="module">
const el = document.querySelector("talos-ticker");
el.push({ msg: "deploy 4f2c1 rolled out", level: "nominal" });
el.push({ msg: "queue depth above 800", level: "warning" });
el.push({ msg: "db replica lag 9 s", level: "critical" });
</script>
The demo pushes one event per second. An event without time is stamped
HH:MM:SS on arrival. The entrance is a one-shot slide that is dropped under
prefers-reduced-motion; the row is fully present either way.
Seeding the window
el.events = [
{ msg: "gateway gw-07 reconnected", level: "ok", time: "14:02:11" },
{ msg: "cert renewal in 6 days", level: "warn", time: "14:02:40" },
];
el.events = [...] replaces the whole window at once.
Behaviour
el.push({ msg, level?, time? }) adds one event at the top and scrolls the
window; el.events gets or replaces the whole window. level is per event:
nominal / warning / critical, with the aliases ok / warn / crit. A
missing level reads nominal; an unknown word reads idle (muted). The host is
role="log" with aria-live="polite": the one instrument where a live region
is correct, because each announcement is an event.
Attributes
Generated from custom-elements.json in the installed package.
Shared attributes (state, format, static…) behave as the
instrument contract describes.
| Attribute | Type | Default | Description |
|---|---|---|---|
cap | number | 8 | max rows retained/shown. |
label | string | — | caption. |
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 |
duration | number | — | transition length in ms |
Properties and methods
| Member | Type | Description |
|---|---|---|
push() | method | Append one event and scroll the window. Preferred entry for streams. |
.events | TickerEvent[] | Seed or replace the whole window at once (declarative-ish convenience). |
CSS parts
::part(caption), ::part(dot), ::part(list), ::part(msg), ::part(row), ::part(time)