Examples
Basic
⌘KFnCtrl
Variant
| Prop | Default | Type | Description |
|---|---|---|---|
kbd | solid | {variant} | The variant of the kbd. |
| Variant | Description |
|---|---|
solid | The default variant. |
outline | The outline variant. |
~ | The unstyle or base variant |
EnterEnterEnter
Color
| Prop | Default | Type | Description |
|---|---|---|---|
kbd | {variant}-gray | {variant}-{color} | The color of the kbd. |
⌘⌘⌘⌘
Size
| Prop | Default | Type | Description |
|---|---|---|---|
size | md | string | The size of the kbd. |
⌘⌘⌘⌘⌘
Integration
NKbd can be used with other components to create more complex elements e.g:
- can be used with
NButtonto create a button that is triggered by a keyboard shortcut. - can be used with
NInputto create an input that is triggered by a keyboard shortcut.
size prop is automatically inherited from the parent component when used with other components.
⌘ K
Slots
| Name | Props | Description |
|---|---|---|
default | - | The content slot. |
Props
types/kbd.ts
Read more in Kbd component props
Presets
shortcuts/kbd.ts
Read more in Kbd component presets