Keycap
Keyboard-hint cap for HUDs — size × tone (affirm/deny).
ui hud
Preview
Installation
npx slintcn@latest add keycapUsage
import { Keycap, KeycapSize, KeycapTone } from "slintcn/components/keycap.slint";
Keycap { text: "⌘"; tone: KeycapTone.on-glass; }
Properties
text
in
string
Label inside the keycap (e.g. `⇧`, `K`).
size
in
KeycapSize
Height + padding — sm, md, lg.
tone
in
KeycapTone
Surface treatment — `on-glass` or `on-solid`.
API
KeycapSizesmmdKeycapToneon-glowon-glassmutedaffirm-on-glowdeny-on-glowaffirm-on-glassdeny-on-glassDependencies
theme only
Installed automatically as transitive dependencies of slintcn add keycap.