# @dioramajs/text/keycaps

Exports of @dioramajs/text/keycaps.

## Functions and values

- [BEZEL](/docs/api/text-keycaps/bezel.md): Rim of the case round the keys when the case fits the keys.
- [board](/docs/api/text-keycaps/board.md): The keys of the text: a row per visual line in reading order, one key per letter, a space bar where the DOM has a space, a wider key for a legend that does not fit one. Keys are KEY em apart, smaller when the board would not fit. The case is the element's box with `fill`, otherwise a rim round the keys, aligned to the text like the text is aligned in its box.
- [default](/docs/api/text-keycaps/default.md): The text set on the keycaps of a mechanical keyboard in 3D: one sculpted, dished cap per letter with the legend printed on top in the text colour, a wide space bar between words, on a darker case seen in perspective with soft shadows. On view the keys go down one after another as if the word were typed, a quick press, a bounce and a flash each; under the pointer they press, a click sends one down hard. Retro beige caps or dark caps with an RGB glow. The text stays real in the DOM.
- [inks](/docs/api/text-keycaps/inks.md): Ink bounds of every piece from the atlas pixels; the DOM box where they cannot be read.
- [KEY](/docs/api/text-keycaps/key.md): Pitch of a key per em of the text.
- [LOOP](/docs/api/text-keycaps/loop.md): Seconds between two runs of the loop trigger.
- [MAX_KEYS](/docs/api/text-keycaps/max-keys.md): Most keys drawn: past them the text stays as it is.
- [rhythm](/docs/api/text-keycaps/rhythm.md): Seconds from the first key to the last, at `speed` keys a second, with a human rhythm.
- [SPACE](/docs/api/text-keycaps/space.md): Width of a space bar.
- [travel](/docs/api/text-keycaps/travel.md): Steps a key toward `target` for `dt` seconds: a stiff spring that bottoms out hard at 1, the stem's top stopping a bounce back a little past rest. True when it hit the bottom moving.

## Types

- [Board](/docs/api/text-keycaps/types/board.md): The keys and the case round them.
- [BoardOptions](/docs/api/text-keycaps/types/board-options.md)
- [Ink](/docs/api/text-keycaps/types/ink.md): Ink bounds of a piece in box px, and whether it has any.
- [KeyPlan](/docs/api/text-keycaps/types/key-plan.md): One key of the board.
- [Spring](/docs/api/text-keycaps/types/spring.md): Where a key travels: its press, 0 at rest and 1 bottomed out, and its speed.
