Skip to the page
TACTILE UI

Kit part · Charts

LED matrix

A dot-matrix display of round LEDs behind smoked acrylic, each with its own bloom and a short warm-up and fade. Status words in a 5×7 face drawn for it, a sparkline, bars, a few icons: “DEPLOY OK”, tokens per second, queue depth.

Element
<tui-matrix>
Needs
kit.css + kit.mjs
Rules
matrix.rules.md · 5
Finishes
Aluminium · Graphite · Porcelain · Black
Volumes
Tactile · Quiet
On this page
  1. Variants
  2. Every state, at once
  3. API
  4. Markup
  5. Accessibility
  6. How it’s built
  7. Rules
  8. Related parts
01

Variants

Failed · red, two lines
Sparkline · GPU temperature, a limit
Bars · queue depth by minute
Marquee · one line, 8 rows, 96 columns
Sized to its box · cols="auto"
Aurora · borealis, an assistant listening
Aurora · ember, tokens per second
Aurora · prism, the full spectrum
Aurora · your own colours
Aurora · mono, shades of one brand colour
02

Every state, at once

Both finishes, side by side. Hover, pressed and focus are forced with .is-hover, .is-down and .is-focus; checked and disabled are real.

Aluminium

PartTextSparklineBarsBlank
Amber
Green
Red
Blue
White

Graphite

PartTextSparklineBarsBlank
Amber
Green
Red
Blue
White
03

API

NameKindValuesWhat it does
<tui-matrix>element—The display: builds the acrylic window and the dots inside itself.
cols · rowsattribute64 · 16The dots that carry the message; a ring of one unlit dot stands round them, so nothing lit touches the window. cols="auto" fits as many as the box holds at `pitch` pixels (8).
textattribute · propertytext, "\n" or &#10; for a second lineThe message. Two lines on 16 rows; wider than the display, it scrolls.
{ok} {warn} {fail} {up} {down} {right} {dot} {bolt} {clock}textin text or captionIcons, seven dots square, read out as words (“OK”, “warning”).
align · scroll · speedattributecentre · boolean · 20Where a static line sits (left, centre, right); scroll it anyway; columns a second.
modeattribute"text" · "spark" · "bars"What the dots show: the text, or the series as a sparkline or bars, newest at the right.
values · min · max · highattributenumbersThe series from markup, its range (0 to the largest by default), and a limit drawn as a dotted row.
caption · precision · unitattributetext · decimals · textPrinted at the left of a graph, {v} being the latest value; the unit is read with the numbers.
barattribute2Bars: columns per bar (one dark column between).
label · liveattributetext · booleanThe display’s name; live announces a new message politely (text mode only).
data-lampattributeamber · green · red · blue · white · auroraThe LEDs’ colour: green done, amber working, red failed, blue linked or for information, white standing by. Aurora is the one light of more than one colour, for a sign whose work is thinking, listening or making.
aurora · aurora-seed · aurora-speedattributeborealis · ember · lagoon · prism · "mono #hex" · two to five hex · a whole number · 0.25 to 3With data-lamp="aurora": the pattern (borealis greens and teals, ember amber to magenta, lagoon cyan to green, prism the full spectrum, mono shades of one colour) or your own colours, the seed that fixes where each colour sits and drifts (none: one per mount), and how fast it drifts.
.push(value) · .setData(values)methodnumber · arrayA reading at the right (the graph moves a column), or a whole series, oldest first.
.text · .clear() · .pause() · .play()property · method—Set the message; let every dot fade; stop and restart a scrolling message and an aurora’s drift.
Pointer over itpointer—A scrolling message holds still while the pointer is on it.
04

Markup

<tui-matrix label="Release board" live data-lamp="green"
    text="{ok} DEPLOY OK&#10;p95 214 ms"></tui-matrix>

<tui-matrix label="Tokens per second" mode="spark"
    caption="{v}&#10;tok/s" min="200" max="500"></tui-matrix>

<tui-matrix label="Queue depth" mode="bars" caption="{v}&#10;jobs"
    min="0" max="120" high="80"></tui-matrix>
import '/kit/kit.mjs';   // defines <tui-matrix>

const sign = document.querySelector('tui-matrix[mode="spark"]');
stream.on('batch', (b) => sign.push(b.tokensPerSecond));   // one column a reading
sign.setData(lastHour);                                     // or a whole series

const board = document.querySelector('tui-matrix[live]');
board.text = '{warn} ROLLING BACK api to 4f2a91c';   // too long: it scrolls
pauseKey.onclick = () => board.pause();              // and play()

Needs kit.css and kit.mjs. How to install the kit.

05

Accessibility

  • The dots are one role="img" named with what they say: the message with its icons as words (“OK DEPLOY OK. p95 214 ms”), or for a graph a summary that states the data: “Tokens per second, last 44 readings: now 412 tok/s, lowest 262, highest 468.”
  • A name that changes is not announced. With live, a new message (not each scroll step, not each reading) is read politely from a status region beside the image.
  • Scrolling holds under the pointer, and pause()/play() are there for a pause key, which a scrolling sign needs beside it.
  • Reduced motion: dots switch at once, no frame is ever requested, and a message too long for the width becomes pages of whole words that change every three seconds.
  • Graphs keep their number: the caption prints the latest value in the dots, so the shape is never the only signal.
  • An aurora drifts on cycles of 12 to 40 seconds and never flashes. It holds still off screen and in a hidden tab, pause() holds it as it holds a scroll, and under reduced motion it is one still frame. Its colours carry no meaning, so a state keeps its own lamp beside the sign.
06

How it’s built

One custom element around a canvas, because it is a thousand lights. The unlit dots (a faint die in each lens, seen through the smoke) are drawn once into a base image; the lit dot is one sprite, a warm-white core in the LED colour inside a bloom three pitches wide, baked once per size and colour. A frame is the base and one additive blit per lit dot, so where dots sit together their blooms add up the way light does in acrylic. Every dot has a light level that runs toward its target, 24 ms up and 80 ms down, so a changing message warms in and fades out rather than switching; while text scrolls the times are 8 and 16 ms, so a moving letter leaves a trace of persistence, not a smear. When every dot has arrived the loop stops. The face is 5×7 with an eighth row for descenders, drawn for this display, figures all five wide; icons are seven square. The acrylic’s sheen is a fixed layer above the canvas, lit from above left. An aurora is the kit’s shared field (aurora.mjs): three to five soft blobs, seeded, drifting on slow cycles. Each frame the field is sampled once a dot into a canvas one pixel a dot, each colour taken to full brightness, since a lit LED is lit whatever its hue. The lit dots are drawn white, the field is laid over them source-in, the hot core goes back on top, and the whole is added to the dark dies, which stay neutral. It runs only while the sign is on screen, at 30 frames a second at most.

07

Rules

matrix.rules.mdIn the brain

Say it in ten characters a line, keep numbers beside the shapes, and let a scrolling sign be paused.

5 rules in this file, with the foundations they rest on and the anti-patterns that break them. Full rules ship in the brain with the Pass.

08
96.4MHz

VFD

A vacuum-fluorescent display: cyan-white light on near-black glass, with a glow and a ghost. Frequencies, levels, status screens.

Lamp

The only colour in the kit: a lamp that is on. Green is on, amber is waiting, red is recording or failing, blue is linked, white is standing by. Always next to words.

03600:0012:0024:00

Glass

Dark display glass for plots and live readouts, whatever the finish around it. Everything printed inside it is lit.

Docs
Finish
Volume