Blossom UI

KBD

Keyboard key component with relief and an active state, plus a shortcut helper such as Ctrl + K.

How to use it

Run npx @blossomui/react add kbd, or copy src/components/UI/KBD/Kbd.tsx into your React project and import it.

import { Kbd, KbdShortcut } from './components/ui/Kbd'

Props

KbdProps

PropTypeDescription
sizeKbdSize`sm` is smaller and fits inside a button or a bar of 40 px.
classNamestringExtra classes of the key.
children (required)ReactNode
colorKbdColor | (string & {})Color of the key: a preset, `accent` for the brand color or any CSS color. `default` is a neutral gray.
reliefbooleanAdds a thicker bottom border so the key looks pressable.
activebooleanHighlights the key, useful to show that it is being pressed. Uses the color of the key, or pink for `default`.

KbdShortcutProps

PropTypeDescription
keys (required)string[]
sizeKbdSize
classNamestringExtra classes of the row of keys.
colorKbdColor | (string & {})A preset or any CSS color.
reliefboolean

Getting started

  • Introduction
  • Installation
  • Changelog

Customization

  • Colors
  • Brand color
  • Texts and translation

Components

  • Accordion
  • Alert dialog
  • Alerts
  • Avatar
  • Badges
  • Banner
  • Breadcrumb
  • Buttons
  • Calendar
  • Cards
  • Carousel
  • Charts
  • Chip input
  • Collapsible
  • Color picker
  • Combobox
  • Command palette
  • Context menu
  • Copy button
  • Date picker
  • Drawer
  • Dropdown
  • Empty state
  • File upload
  • Footer
  • Forms
  • Hover card
  • Jumbotron
  • KBD
  • Menubar
  • Modal
  • Navbar
  • Navigation menu
  • Number input
  • OTP input
  • Pagination
  • Popover
  • Pricing
  • Progress
  • Rating
  • Resizable panels
  • Scroll area
  • Segmented control
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Spinners
  • Stats
  • Stepper
  • Survey
  • Table
  • Tabs
  • Time picker
  • Timeline
  • Timer button
  • Toasts
  • Tooltip
  • Transfer list
  • Tree