An event log like the roll of a chart recorder. The rail is engraved down the plate and each event is a tick stamped across it, with its time in tabular figures and its words beside it. A lamp on the rail is the only colour, and a marker for the present separates what has happened from what is still to come.
import { timelineAppend } from '/kit/kit.mjs'; // optional: the markup needs no script
// Stamps a new event in above the pen. Time and datetime default to now.
timelineAppend(document.querySelector('.tui-timeline'), {
title: 'Alert cleared',
text: 'Error rate under 0.1% for an hour.',
lamp: 'green', // 'green' | 'amber' | 'red' | 'blue' | 'white'
state: 'Passed', // what the lamp says, in words
});
// Something still to come goes after the pen:
timelineAppend(list, { time: '14:00', title: 'Release review' }, { future: true });
It is an ordered list, so a screen reader says how many events there are and which one it is on. Each time is a <time datetime>.
A lamp is state and nothing else, and it is given a spoken name (role="img" and an aria-label such as “Failed”); the ticks and rails are hidden from assistive technology.
The pen is aria-current="time", so “Now” is said where it stands in the list.
The dotted rail after the pen is not the only sign that events are still to come: they follow the pen in the reading order, and their text is a step quieter, still above 4.5:1.
With aria-live="polite" on the list, an appended event is read out when it arrives without pulling focus.
With reduced motion a new event simply appears; nothing is lost.
06
How it’s built
One grid per event: the time, a rail cell and the words. Each event draws its own length of the rail, a 2px groove darker than the plate with its lower edge lit by the lamp above, so the rail is continuous with nothing to position. The tick is a 14px bar stamped across it; with a lamp in it, the lamp is set in the rail instead. The rail below the pen is the same groove dotted in, done with one sibling selector, so there is no “future” class to forget. The pen is the kit’s contrast cap on the time side, a diamond on the rail and a rule across. Appending stamps the tick in with a short overshoot; there is no script needed to draw any of it.
07
Rules
timeline.rules.mdIn the brain
What happened, in order, with the state of each thing said by a lamp and in words.
6 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.
Rows in a rack: a mark, a title, a second line and a fact or a key at the end. Chosen rows sink into a recess with their check key latched; in a running order, a row lifts out of the rack on its skirt and slides past the others, from the keyboard or by its grip.
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.
A strip-chart recorder: gridded paper advancing under a pen that rides a rail, drawing the live value as the paper moves and printing the time in the margin. For p95 latency, tokens per second, grid frequency, a cold room’s log.