Kbd
Display keyboard input or hotkey.
Press ā+C to copy.
Kbd example
import { Kbd } from "@/shim-ui/kbd";
export default () => (
<p>
Press <Kbd>ā+C</Kbd> to copy.
</p>
);
Install
Use the CLI or copy the source code manually.
Command
Source code
pnpm dlx @kkga/shim add kbd
Variant example
import { Kbd } from "@/shim-ui/kbd";
export default () => (
<>
<Kbd variant="surface">Ctrl+C</Kbd>
<Kbd variant="plain">Ctrl+C</Kbd>
</>
);
Size example
import { Kbd } from "@/shim-ui/kbd";
export default () => (
<>
<Kbd size={1}>Ctrl+C</Kbd>
<Kbd size={2}>Ctrl+C</Kbd>
<Kbd size={3}>Ctrl+C</Kbd>
</>
);