Componentpickers1.06 KB gzipZero dependencies
HotkeyRecorder
Record keyboard hotkey combinations with visual chip display
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add hotkey-recorderOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { HotkeyRecorder } from "@/components/ui/hotkey-recorder"; <HotkeyRecorder defaultValue="Ctrl+Shift+Z" onValueChange={(v) => {}} />Source code
hotkey-recorder.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxhotkey-recorder.tsx151 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface HotkeyRecorderProps extends Omit<React.HTMLAttributes<HTMLElement>, "value" | "defaultValue"> { value?: string; defaultValue?: string; onValueChange?: (value: string) => void; className?: string;} export function HotkeyRecorder({ value: controlledValue, defaultValue = "", onValueChange, className, ...props}: HotkeyRecorderProps) {Props
Interactive Prop Playground
Tweak parsed AST props below to generate ready-to-paste JSX.
tsx3 lines
import { HotkeyRecorder } from "@/components/ui/hotkey-recorder"; <HotkeyRecorder />| Prop | Type | Description |
|---|---|---|
| value | string | Controlled value. |
| defaultValue | string | Initial value when uncontrolled. (Default: "") |
| onValueChange | (value: string) => void | Callback invoked on value change. |
| className | string | Optional Tailwind or custom CSS classes merged with component styles. |