8.7k

Kbd

A component for displaying keyboard keys and shortcuts.

Installation

pnpm dlx shadcn@latest add @coss/kbd

Usage

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

Single key:

<Kbd>K</Kbd>

Multiple keys (key combination):

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

Examples

Input Group

Component input-group-with-kbd not found in registry.

API Reference

Kbd

Displays a single keyboard key.

<Kbd>⌘K</Kbd>

KbdGroup

Groups multiple keyboard keys for key combinations.

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

coss.com ui

Built by and for the team of Cal.com, Inc. — the leading commercial open source company (“coss”).