LCD
A value that changes, on grey-green liquid crystal, with a ghost of the unlit segments behind it: clocks, battery, counters.
Kit part · Carousels
Slides seen one at a time through a viewer’s gate: transport keys either side of a frame counter on an LCD, lamp keys to jump, swipe on touch. Nothing moves on its own unless you ask it to.
“The room is quiet enough to hear the tape hiss.”
“Booked at nine, tracking by ten. Nothing to fight.”
“The monitors tell the truth, even when I do not want it.”
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
| Part | Rest | Hover | Pressed | Focus | Disabled |
|---|---|---|---|---|---|
| Transport | |||||
| Lamp key | |||||
| Counter | 01/04 | 02/04 | 03/04 | 04/04 | 01/04 |
Graphite
| Part | Rest | Hover | Pressed | Focus | Disabled |
|---|---|---|---|---|---|
| Transport | |||||
| Lamp key | |||||
| Counter | 01/04 | 02/04 | 03/04 | 04/04 | 01/04 |
| Name | Kind | Values | What it does |
|---|---|---|---|
| label | attribute | required | Names the carousel: role="region" with aria-roledescription="carousel". |
| .tui-carousel__slide | class | on each child | A slide. Give each an aria-label (or a figcaption); it becomes “2 of 4: Next session”. |
| .tui-carousel__picture · __caption | class | — | A picture area and a printed caption strip: title in <b>, a line in <span>. |
| autoplay | attribute | ms, e.g. 6000 | Advance on a timer. Adds a stop key first in the bar; hover or focus holds it; reduced motion never starts it. |
| index | attribute · property | 0-based | The slide in the gate. Setting the property scrolls there. |
| go(i) | method | wraps at the ends | Bring slide i into the gate. |
| change | event | bubbles | A different slide is in the gate. |
| .tui-carousel__count | class | LCD, “02/04” | The frame counter. Hidden from screen readers: the slide’s own label says the same. |
| .tui-carousel__picks | class | lamp keys | One 24px key per slide, the current lamp lit amber. Hidden under 300px. |
| ArrowLeft · ArrowRight | keyboard | on the gate | Previous and next slide. Home and End: the first and last. |
| Swipe | touch | native scroll | Scroll snapping, one slide per swipe (scroll-snap-stop). |
<tui-carousel label="Studio tour">
<figure class="tui-carousel__slide" aria-label="Solar today">
<div class="tui-carousel__picture">…</div>
<figcaption class="tui-carousel__caption"><b>Solar today</b><span>Peaked at 5.4 kW at 13:00.</span></figcaption>
</figure>
<figure class="tui-carousel__slide" aria-label="Next session">…</figure>
<figure class="tui-carousel__slide" aria-label="Levels">…</figure>
</tui-carousel>
<!-- Rotation only when asked: a stop key comes first, reduced motion keeps it still. -->
<tui-carousel label="Quotes" autoplay="6000">…</tui-carousel>import '/kit/kit.mjs'; // defines <tui-carousel>
const tour = document.querySelector('tui-carousel');
tour.addEventListener('change', () => track('slide', tour.index));
tour.go(2); // bring the third slide into the gateNeeds kit.css and kit.mjs. How to install the kit.
aria-roledescription="carousel"; each slide a group with aria-roledescription="slide" and a label like “2 of 4: Next session”.inert, so Tab never lands on something you cannot see.aria-current.prefers-reduced-motion, and the stop key is the first control, as the pattern asks.A custom element that moves its slides into a track and builds the gate and the bar around them. The track is a native horizontal scroller with scroll-snap-type: x mandatory and scroll-snap-stop: always, so a swipe, a trackpad and scrollTo all land on whole slides with no gesture code; the counter follows the scroll position as a slide passes halfway, and scrollend settles which slides are inert. Under reduced motion the keys jump instead of gliding. The gate is the kit’s recess, 6px deep, with an inner shadow where its upper wall shades each slide.
A carousel hides most of what it holds, so nothing important may live only there, and it never moves unless asked.
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.
A value that changes, on grey-green liquid crystal, with a ghost of the unlit segments behind it: clocks, battery, counters.
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 key with an icon and no words, square or round: transport, power, the small tools. Its aria-label names it; a tip shows the name.