Homelogologo
Sponsor

Kbd

Displays keyboard shortcuts for an action

Usage

The Kbd component displays keyboard keys and shortcuts for an action. Use Kbd.Item to represent individual keys or key combinations.

import { Kbd } from "@elemnts-ui/react"
<Kbd> <Kbd.Item /> </Kbd>

Sizes

Use the size prop to change the visual scale of keys.

iconOnly

Place Kbd within text to render keys inline

Variants

Use the variant prop to change the visual style of keys.

Palettes

Use the colorPalette prop to apply different color themes to keys.

This example showcase differet navigation keys such as ArrowUp, ArrowDown, ArrowLeft, ArrowRight, Enter, PageUp, and PageDown.

Inline

Place Kbd within text to render keys inline

API Reference

KbdGroup

Groups multiple kbd component together

PropTypeDefault
variant'primary' | 'secondary' | 'tertiary' | 'surface' | 'ghost'primary
asReact.ElementTypeundefined
asChildbooleanundefined

KbdGroupSeparator

Separates kbd within a group

PropTypeDefault
variant'primary' | 'secondary' | 'tertiary' | 'surface' | 'ghost'primary
asReact.ElementTypeundefined
asChildbooleanundefined

Kbd

Renders a kbd component

PropTypeDefault
variant'primary' | 'secondary' | 'tertiary' | 'surface' | 'ghost'primary
asReact.ElementTypeundefined
asChildbooleanundefined