NAMCHE UI

Kbd

A small key-cap label for documenting keyboard shortcuts.

Open command paletteK
Redeploy last buildD
CancelEsc

Install

pnpm dlx shadcn@latest add @namche/kbd

Usage

import { Kbd, KbdGroup } from '@/components/ui/kbd';

<KbdGroup>
  <Kbd>⌘</Kbd>
  <Kbd>K</Kbd>
</KbdGroup>

Kbd renders a <kbd> element sized for a single key; wrap a chord in KbdGroup to space multiple keys evenly. Inside a TooltipContent, Kbd automatically switches to a translucent variant so it reads correctly against the tooltip's inverted background.

On this page