Kbd

Inline keyboard hint with a hand-drawn border.

Press

⌘
K
to search

<Kbd roughness={1.5}>⌘</Kbd> <Kbd roughness={1.5}>K</Kbd>

CLI install

npx doodleui-react add kbd

Usage

import { Kbd } from "doodleui-react";

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

Props

PropTypeDefaultNotes
animatebooleantrueDraw-in the key border on mount. Overrides DoodleUIProvider. Reduced motion disables this unless the provider set forceAnimate.
roughnessnumber1.5How wobbly the stroke is. 0 is almost geometric. 3+ is messy.
seednumberprovider / randomLocks the sketch. Omit to follow SketchSeedProvider (Shuffle) or a mount-time random seed.
sketchColorstring#1f1d1aStroke color. Also tints primary/accent fills where relevant.
classNamestringundefinedPassed through to the root element.
styleCSSPropertiesundefinedPassed through to the root element.