Fusuma

Components / Components

kbd

A key cap labelled label.

Try it

This is the Data page of the gallery, running in your browser: kbd is on it, and it is the real widget. Press Run, then use it.

Live: Data, where kbd is usedOpen full size

Also on this pagespinnerratingcarouseltimelinetableline_chartarea_chartbar_chart

A key cap labelled label.

Signature

pub const fn kbd(label: &str) -> Kbd<'_>

Example

use fusuma::{kbd, row, text};
let view = row((kbd("Ctrl"), kbd("K"), text("to search")));
let built = fusuma::doc::built::<(), _>(&view);
assert_eq!(built.texts(), ["Ctrl", "K", "to search"]);

All components · Source