Components

Kbd

A tiny mechanical keycap for keyboard shortcuts in your text. Give it a key to listen for and it presses down — and lights up — when you hit it.

Paste it into ChatGPT, Claude, Cursor or v0.

Usage

React
import { Kbd } from '@vizzele/react';

<p>
  Press <Kbd listen="Meta">⌘</Kbd> <Kbd listen="k">K</Kbd> to search
</p>

Props

PropTypeDefaultDescription
listenstring—Press while this key is held — a KeyboardEvent.key ("k", "Shift") or .code ("KeyK").
childrenReactNode—The legend.

Accessibility

  • A real <kbd> element, so the shortcut reads as keyboard input.