NeonKit
esc
  • IntroductionGetting started
  • InstallationGetting started
  • ThemingGetting started
  • Use with AIGetting started
  • All componentsGetting started
  • ButtonSolid, outline, soft, ghost and link buttons that light up on hover.Forms
  • InputText field with an animated neon focus ring, icons, labels and error states.Forms
  • TextareaMulti-line field that grows with its content and counts characters.Forms
  • SelectKeyboard-friendly listbox with a glowing popover and typeahead.Forms
  • CheckboxCheckbox with a drawn-on checkmark and indeterminate state.Forms
  • Radio GroupSingle choice from a set, with arrow-key navigation and card layouts.Forms
  • SwitchA toggle that powers on like a neon tube.Forms
  • SliderPointer and keyboard slider with a glowing track and optional range.Forms
  • OTP InputOne-time code input with auto-advance, paste and backspace handling.Forms
  • BadgeStatus labels with optional live dot and remove button.Data Display
  • AvatarProfile image with initials fallback, status light and stacked groups.Data Display
  • CardSurface with header, content and footer slots and a lit edge.Data Display
  • KbdKeyboard keys and shortcuts that glow when pressed.Data Display
  • TabsTabbed panels with a sliding light indicator and roving focus.Data Display
  • AccordionCollapsible sections with smooth height animation.Data Display
  • ProgressLinear and circular progress with a moving highlight.Feedback
  • SpinnerRing, dots and bars loaders in any neon color.Feedback
  • SkeletonLoading placeholders with a scanning shimmer.Feedback
  • AlertInline messages for info, success, warning and errors.Feedback
  • ToastStacked notifications with a tiny toast() API. No provider needed.Feedback
  • DialogAccessible modal built on the native dialog element.Overlay
  • TooltipHover and focus hints on four sides.Overlay
  • Neon TextText rendered as a glowing tube sign, with optional power-on flicker.Effects
  • Border BeamA beam of light that travels around any element's border.Effects
  • Spotlight CardCard whose border and surface light up under the cursor.Effects
  • Retro GridSynthwave perspective grid that scrolls toward the horizon.Effects

Components/Data Display

Kbd

Keyboard keys and shortcuts that glow when pressed.

Hold ⌘ and press K. The keys light up as you type.

Installation#

npx shadcn@latest add https://get-neonkit.vercel.app/r/kbd.json

Usage#

import { Kbd, KbdCombo } from "@/components/ui/kbd"

<KbdCombo keys={["⌘", "K"]} listen />
<Kbd listen="Shift">Shift</Kbd>

Examples#

Shortcut sheet

separator accepts any node, or null for keys side by side.

Keyboard shortcuts
ActionShortcut
Open command menuCommandK
Toggle sidebarCommandB
Copy component sourceCommandShiftC
Next exampleJ
Previous exampleK
Go to settingsGthenS
Close dialogEsc

Listening keys

listen takes a KeyboardEvent.key value and matches it case-insensitively.

Press Shift, any modifier or the space bar.

Sizes and pressed state

pressed forces the lit state, for tutorials and game controls.

Command+KCommand+KCommand+K
WASD

API reference#

Kbd

Renders a kbd element and accepts every native attribute.

PropTypeDefault
size"sm" | "md" | "lg"

20, 24 or 32px tall.

"md"
pressedboolean

Forces the lit, pushed-down state.

false
listenstring

KeyboardEvent.key to watch, like "k", "Shift", "Meta" or "Enter". Lights up while held.

—
colorNeonColor

Palette name or hex. Falls back to --neon-accent, then cyan.

inherited

KbdCombo

A kbd that wraps one Kbd per key, as HTML recommends for key combinations.

PropTypeDefault
keysstring[]

Key labels in order. ⌘ ⌥ ⇧ ⌃ ↵ and arrows get spoken names.

—
listenboolean

Each key listens for itself. ⌘ maps to Meta, ⌥ to Alt, ⇧ to Shift, ⌃ to Control, ↵ to Enter, Esc to Escape.

false
separatorReactNode

Rendered between keys. Pass null for none.

"+"
size"sm" | "md" | "lg"

Size of every key.

"md"
colorNeonColor

Color of every key.

inherited

Accessibility#

  • Kbd is display only. listen never prevents default or triggers anything, so wire the real shortcut yourself.
  • Symbol keys in KbdCombo carry a screen reader label, so ⌘ is read as "Command".
  • Held keys clear when the window loses focus, and releasing ⌘ clears the rest because macOS drops their keyup events.