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/trail-shortcut-key
PROMPT
Add the Goop Shortcut key to this project. The install steps are at https://goop.so/docs/install.md
width, padding, corner, border, text: add no class for these.
API reference
Options
Option
Type
What it does
asChild?
boolean = false
Render the key's look on the one child element instead of a kbd.
data-slot values (to select a part by): shortcut-key
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/trail/components/shortcut-key.md · the page as Markdown