Faber UI
Components

Kbd

Displays a keyboard keycap.

Kbd renders a styled keyboard keycap, useful for documenting shortcuts. KbdGroup combines multiple keys with plus separators.

Installation

Terminal
pnpm dlx shadcn@latest add https://faber-ui.vercel.app/r/kbd.json

Usage

typescript
import { Kbd } from "@/components/ui/kbd";

export default function Example() {
  return <Kbd>⌘K</Kbd>;
}

Examples

Default

⌘K

Group

⌘ShiftP

API

Each part forwards every prop of what it is built on, including className and render where Base UI supports it. The props column lists only what Faber UI adds on top.

PartBuilt onProps
Kbddata-slot="kbd"<kbd>HTML—
KbdGroupdata-slot="kbd-group"<kbd>HTML—

Changelog

  1. v0.3.0KbdGroup is typed as a kbd element, Combobox imports its Base UI subpath, the motion lib mirrors the exit easing and travel tokens, and the chart item declares its react-is peer.patch
Full Kbd history

Last updated on

On this page