Components / Kbd
Kbd
Keyboard key, for showing shortcuts.
Example
The component itself, running in WebAssembly, beside its code in a playground. Try it.
Code
use ravenrs::prelude::*;
fn kbd() -> impl View {
HStack::new((
Kbd::new("⌘"),
Kbd::new("Shift"),
Kbd::new("K"),
// The button gives the key its own color.
Button::new("Open").size(ButtonSize::Small).shortcut("F8"),
))
.spacing(8.0)
.align(Align::Center)
}