vamsiy78

Shortcut Hint

Component

About

A compact, accessible keyboard shortcut label that pairs keycap icons with the action they trigger, for use in menus and command palettes.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Shortcut Hint to your project and fits it to your theme.

Code

How Shortcut Hint is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { ShortcutHint } from "@/components/ui/shortcut-hint";
export default function ShortcutHintDemo() {
  return (
    <div className="bg-card flex w-full max-w-xs flex-col gap-1 rounded-xl border border-border p-2 shadow-sm">
      <div className="hover:bg-accent rounded-md px-3 py-2">
        <ShortcutHint
          className="w-full justify-between"
          label="Search anything"
          keys={["⌘", "K"]}
        />
      </div>
      <div className="hover:bg-accent rounded-md px-3 py-2">
        <ShortcutHint
          className="w-full justify-between"
          label="Create project"
          keys={["⌘", "N"]}
        />
      </div>
    </div>
  );
}

More by vamsiy78

View all
  • Animated Beam

    Animated Beam

    53
  • Glow Border

    Glow Border

    16
  • Agent Roster

    Agent Roster

    13
  • Segmented Control

    Segmented Control

    12
  • FAQ Accordion Section

    FAQ Accordion Section

    3
  • API Key Field

    API Key Field

    3
  • Signature Pad

    Signature Pad

    1
  • Table Of Contents

    Table Of Contents

    1