Theme
Install with your agentnpx shadcn@4.23.1 add @goop/meadow-shortcut-key

Shortcut key

Free

One keyboard key drawn as a small bordered cap inline in hint text, naming a chord with its neighbours, for React and Tailwind CSS. Free, MIT.

Pick one key or a pair, or type keys of your own, a space or + between two: the keys sit in the sentence that names them. Pressing the keys does nothing here: the shortcut key only shows them.

When to use

  • One keyboard key drawn as a small bordered cap inline in hint text, naming a chord with its neighbours.
  • Also called: kbd or keyboard key.

Installation

Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Shortcut key on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing.

Terminal
npx shadcn@4.23.1 add @goop/meadow-shortcut-key
PROMPT
Add the Goop Shortcut key to this project. The install steps are at https://goop.so/docs/install.md

Usage

TSX
import { ShortcutKey, ShortcutKeyGroup, ShortcutKeySeparator } from '@/components/ui/goop/shortcut-key';

function NewTaskHint() {
  return (
    <p className="flex items-center gap-1 text-base text-muted-foreground">
      Press
      <ShortcutKey>Ctrl</ShortcutKey>
      <ShortcutKey>N</ShortcutKey>
      to add a task
    </p>
  );
}

function FieldNoteShortcut() {
  return (
    <div className="flex items-center justify-between py-3">
      <span className="text-lg font-medium">Open a field note</span>
      <ShortcutKeyGroup size="lg" aria-label="Command J or Command K">
        <ShortcutKey>⌘</ShortcutKey>
        <ShortcutKey>J</ShortcutKey>
        <ShortcutKeySeparator />
        <ShortcutKey>⌘</ShortcutKey>
        <ShortcutKey>K</ShortcutKey>
      </ShortcutKeyGroup>
    </div>
  );
}
  • Fits: settings, states: body.
  • Also known as: Kbd.
  • height, width, padding, gap, corner, background, text, motion: add no class for these.

API reference

Options
OptionTypeWhat it does
sizemd | lg = md
asChild?boolean = falseRender the key's look on the one child element instead of a kbd.
Parts
PartWhat it is
ShortcutKeyGroupOne key combination — a chord such as Command and K, or a choice of chords with a ShortcutKeySeparator between them — said to a reader as one group (a kbd of kbds, HTML's own markup for a key combination); size?: 'md' | 'lg' = 'md' — The size of the keys and the joiner inside the group: md (the default) or lg
ShortcutKeySeparatorThe faint joiner between two chords in a ShortcutKeyGroup — a comma by default, or your own word ("or", "then")
  • Class recipes (cva): shortcutKeyVariants (ShortcutKey)
  • data-slot values (to select a part by): shortcut-key, shortcut-key-group, shortcut-key-separator

Motion

  • The part sets its own motion: add no transition or animation of your own.

Notes for AI

Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.

goop.so/themes/meadow/components/shortcut-key.md · the page as Markdown
Theme
Install with your agentnpx shadcn@4.23.1 add @goop/meadow-shortcut-key

Where would you like to start?

Free · now

The Goop plugin

A design system for your AI coding agent, so screen ten matches screen one.

/plugin marketplace add goop-so/skillsthen /plugin install goop@goopCodex, Cursor, ChatGPT, the Claude app and more: Connect Goop
FreePro

The components

Every part live, with its props, its keys and what an agent sees. Whole page and app templates, working with sample data.