Fidely UI v1 beta is now available!. 🚀

Kbd

Displays keyboard keys or shortcuts in an inline, readable format.

Ctrl + K

Usage

import { Kbd } from '@fidely-ui/react'
<Kbd>Ctrl</Kbd>

Variants

Change the appearance of the keyboard key using the variant prop.

F12F5F11

Sizes

Adjust the size of the keyboard key using the size prop.

F12F5F11

Props

Kbd

PropDefaultTypeDescription
sizemd'sm' | 'md' | 'lg'Controls the size of the keyboard key.
variantsubtle'solid' | 'subtle' | 'outline'Defines the visual style of the keyboard key.
colorPalettegray"red" | "blue" | "green" | "purple" | "orange" | "gray"Sets the color palette of the component.
as—React.ElementTypeThe underlying element to render.
asChildfalsebooleanUse the provided child element as the default rendered element, combining their props and behavior.
unstyledfalsebooleanWhether to remove the component's style.
children—React.ReactNodeThe content inside the keyboard key, typically the key label.