⌘+K
Installation
CLI
Manual
Install the following dependencies:
Copy and paste the following code into your project.
Update the import paths to match your project setup.
Usage
Import all parts and piece them together.
Predefined Key Titles
The component provides predefined titles for common keyboard symbols.
Personalized Key Titles
You can define custom titles for any key
Examples
Default
⌘+K
Outline
⌥+⇥
Ghost
⇧+⌥+F
API Reference
Root
The primary container for displaying keyboard shortcuts.
Prop | Type | Default |
---|---|---|
variant | "default" | "outline" | "ghost" | "default" |
size | "default" | "sm" | "lg" | "default" |
asChild | boolean | false |
Data Attribute | Value |
---|---|
[data-slot] | "kbd" |
Key
Represents an individual keyboard key.
Prop | Type | Default |
---|---|---|
title | string | - |
asChild | boolean | false |
Data Attribute | Value |
---|---|
[data-slot] | "kbd-key" |
Separtor
A visual separator between multiple keys.
Prop | Type | Default |
---|---|---|
asChild | boolean | false |
Data Attribute | Value |
---|---|
[data-slot] | "kbd-separtor" |