Kbd
Keyboard key indicator component.
Preview
A preview of the Kbd component with interactive controls.
⌘K
Ctrl+C
⇧⌘P
EnterEsc Interactive
Installation
Add the Kbd component to your project.
ng g @ng-cn/core:c kbdUsage
Import and use the Kbd component in your Angular application.
<div class="flex flex-wrap items-center gap-4">
<div class="flex items-center gap-1">
<Kbd>⌘</Kbd>
<Kbd>K</Kbd>
</div>
<div class="flex items-center gap-1">
<Kbd>Ctrl</Kbd>
<span class="text-muted-foreground">+</span>
<Kbd>C</Kbd>
</div>
<div class="flex items-center gap-1">
<Kbd>⇧</Kbd>
<Kbd>⌘</Kbd>
<Kbd>P</Kbd>
</div>
<Kbd>Enter</Kbd>
<Kbd>Esc</Kbd>
</div>Examples
Explore different variations and use cases for the Kbd component.
Basic
Interactive
API Reference
Props | Prop | Type | Default | Description |
|---|---|---|---|
class | string | — | Additional CSS classes. |