⌘ ⇧ ⌥ ⌃ Ctrl + B
Installation
Copy and paste the component source files linked at the top of this page into your project.
Usage
<script lang="ts">
import * as Kbd from "$lib/components/ui/kbd/index.js";
</script>
<Kbd.Root>B</Kbd.Root> Examples
Group
Use the Kbd.Group component to group keyboard keys together.
Use Ctrl + B Ctrl + K to open the command palette
Button
Use the Kbd.Root component inside a Button component to display a keyboard key inside a button.
Tooltip
You can use the Kbd.Root component inside a Tooltip component to display a tooltip with a keyboard key.
Input Group
You can use the Kbd.Root component inside a InputGroup.Addon component to display a keyboard key inside an input group.