Keyboard key preview
Readable key labels and accessible shortcut chords for menus, search and help.
free · Essentials · primitive
When to use
- Use it when a product interface needs readable key labels and accessible shortcut chords for menus, search and help.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.
Alternatives
- Choose tidal-button instead when press, loading, success and disabled states is the actual interface need, rather than keyboard key.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add https://tidalui.com/r/keyboard-key.jsonImport components/ui/tidal.css, components/ui/keyboard-key.css. Wrap installed components in tidal-scope.
Preview

Minimal example
import"./components/ui/tidal.css";
import"./components/ui/keyboard-key.css";
import{TidalKeyboardKey}from"./components/ui/keyboard-key";
export default()=><div className="tidal-scope"><TidalKeyboardKey children={"value"}/></div>;API and props
TidalKeyboardKey.children (required)string | numberRequired children value accepted by this exported component.
TidalKeyboardKey.size"sm" | "md" | undefinedOptional size value accepted by this exported component.
TidalKeyboardShortcut.keys (required)ReadonlyArray<TidalShortcutKey>Required keys value accepted by this exported component.
TidalKeyboardShortcut.separatorstring | number | undefinedOptional separator value accepted by this exported component.
TidalKeyboardShortcut.size"sm" | "md" | undefinedOptional size value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- Install the declared registry dependencies and render inside a tidal-scope with the foundation stylesheet loaded.