bearnie

Kbd

Used to display textual user input from keyboard.

K

Installation

npx bearnie add kbd
npx bearnie add kbd

Usage

import { Kbd, KbdGroup } from "@/components/ui"
<Kbd>Ctrl</Kbd>

Examples

Group

Use the KbdGroup component to group keyboard keys together.

Ctrl Shift K

Button

Use the Kbd component inside a Button component to display a keyboard key inside a button.

Tooltip

You can use the Kbd component inside a Tooltip component to display a tooltip with a keyboard key.

Input group

You can use the Kbd component inside a InputGroupAddon component to display a keyboard key inside an input group.

K

Anatomy

  • Kbd - Displays a single keyboard key with proper styling
  • KbdGroup - Groups multiple Kbd components together

Props

Kbd

PropTypeDefaultDescription
classstring-Additional CSS classes

KbdGroup

PropTypeDefaultDescription
classstring-Additional CSS classes