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>
);
}








