board function
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.
import { board } from '@dioramajs/text/keycaps'. 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.
function board(
pieces: readonly Piece[],
ink: readonly Ink[],
options: BoardOptions,
): BoardParameters
| Name | Type | Description |
|---|---|---|
pieces | readonly Piece[] | |
ink | readonly Ink[] | |
options | BoardOptions |
Defined in packages/text/src/keycaps.ts.