Skip to content

InputsLumen Halo

Shortcut RecorderProv1.0.0

Press it, then press the keys: held modifiers show as key caps at once, the first other key completes the combination, and a taken one is refused with what it's already used for.

Built on shadcn/ui

.md
pnpm dlx shadcn@latest add @beautiful-ui-pro/lumen-shortcut-recorder

Needs your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.

Styles didn't apply?

The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.

Set up the Beautiful UI registry

Free pieces install from their URL with no setup (that URL gives the Base UI build; Radix projects use /r/radix-nova/<name>.json, or add the registries below and the CLI picks your build). Pro pieces need the registries below and BEAUTIFUL_UI_TOKEN in .env.local.

components.json
{
  "registries": {
    "@beautiful-ui": "https://beautiful-ui.dev/r/{style}/{name}.json",
    "@beautiful-ui-pro": {
      "url": "https://beautiful-ui.dev/r/pro/{style}/{name}.json",
      "headers": { "Authorization": "Bearer ${BEAUTIFUL_UI_TOKEN}" }
    }
  }
}

MCP server

claude mcp add --transport http beautiful-ui https://beautiful-ui.dev/api/mcp
Catalog for agents: /llms.txt
Allow taken combinations

Usage

Import it and pass your content. The props that matter most are listed next.

Example
"use client";

import * as React from "react";
import { ShortcutRecorder } from "@/components/ui/lumen/controls/shortcut-recorder";

export function SearchShortcutSetting() {
  const [combo, setCombo] = React.useState("Meta+K");
  return (
    <div className="flex items-center justify-between gap-6">
      <span>Open search</span>
      <ShortcutRecorder aria-label="Open search" value={combo} onValueChange={setCombo} conflicts={{ "Meta+S": "Save", "Meta+P": "Print" }} />
    </div>
  );
}

Props

  • aria-label–

    string

    What the shortcut does, e.g. "Open search". Names the control.

  • value / defaultValue / onValueChange–

    string

    The combination as a string: modifiers in the order Ctrl, Alt, Shift, Meta, then the key ("Ctrl+Shift+K"). "" is none.

  • conflicts–

    Record<string, string> | (combo) => string | null

    Combinations in use, with what they do. A taken one is refused and named.

  • allowConflictsfalse

    boolean

    Save a taken combination anyway; the warning still shows.

  • requireModifiertrue

    boolean

    Refuse a single key (Shift alone doesn't count); function keys are always fine.

  • clearable / disabledtrue / false

    boolean

    A clear button (and Backspace) / off.

Show all 7 props
  • labels–

    Partial<ShortcutRecorderLabels>

    Every word, for other languages.

Source

components/ui/lumen/controls/shortcut-recorder.tsx

This component is included with Pro.

Try the live preview above. Get Pro to install the source.