Skip to content
h v3.13.3
Search the docs
Find a component, section or page.

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/ui

Usage

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

ref bindable HTMLElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLElement> from svelte/elements
Prop Type Default
ref bindable HTMLElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLElement> from svelte/elements

Kbd.Group

ref bindable HTMLElement | null
Default null
class string
children Snippet
...rest
Every prop of HTMLAttributes<HTMLElement> from svelte/elements
Prop Type Default
ref bindable HTMLElement | null null
class string
children Snippet
...rest Every prop of HTMLAttributes<HTMLElement> from svelte/elements