Key
Every button, and every link that acts like one: a cap on a skirt that drops below the plate when pressed.
Kit part · Tooltips
A one-line name for an icon key, printed on a small dark plate above it on hover and on keyboard focus.
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 | Focus |
|---|---|---|---|
| Tip |
Graphite
| Part | Rest | Hover | Focus |
|---|---|---|---|
| Tip |
| Name | Kind | Values | What it does |
|---|---|---|---|
| data-tip | attribute | text | The words. Shown above, centred, on :hover and :focus-visible. |
| position: relative | side effect | — | The kit sets it on any element with data-tip, to place the tip. |
<button class="tui-key tui-key--icon" aria-label="Play" data-tip="Play">
<svg viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M5 3.5v9l7-4.5z"/></svg>
</button>Needs kit.css only, no script. How to install the kit.
aria-label is what names the key. Keep the two the same.One ::after with content: attr(data-tip), in the contrast colours. No script and no positioning engine, so keep tips to a word or two and away from the viewport’s edges.
Icon keys need an aria-label and a data-tip.
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.
Every button, and every link that acts like one: a cap on a skirt that drops below the plate when pressed.
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 small printed plate: a type, a count, a badge. Solid for the one tag that must stand out.