Kbd
A key cap for a shortcut, alone or as a group of keys.
⌘ K
Press Esc to close, ↑ ↓ to move and ↵ to open.
Installation
pnpm add @heyramzi/uiUsage
import { Kbd, KbdGroup } from "@heyramzi/ui/shadcn/kbd";<KbdGroup>
<Kbd>⌘</Kbd>
<Kbd>K</Kbd>
</KbdGroup>
<p>Press <Kbd>Esc</Kbd> to close.</p>API reference
Kbd.Root
refbindableHTMLElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLElement>fromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLAttributes<HTMLElement> from svelte/elements | |
Kbd.Group
refbindableHTMLElement | null- Default
null classstringchildrenSnippet...rest- Every prop of
HTMLAttributes<HTMLElement>fromsvelte/elements
| Prop | Type | Default |
|---|---|---|
ref bindable | HTMLElement | null | null |
class | string | |
children | Snippet | |
...rest | Every prop of HTMLAttributes<HTMLElement> from svelte/elements | |