Kbd (Keyboard Key)

Used to display textual user input from a keyboard, such as shortcuts and key commands.

About

The Kbd component is a semantic element that indicates keyboard input. It's often used in documentation, tutorials, and application interfaces to communicate shortcuts (e.g., "Press ⌘K to search").

Installation

Run the following command to install the kbd component:

Usage

kbd-usage.ts

Default

Standard keyboard keys with symbols or text labels.

Basic usage
Symbols
Text Labels
CtrlAltShiftEnter

Keyboard Groups

Use hlmKbdGroup to visually connect multiple related keys.

Standard GroupK
Complex ShortcutCtrlShiftP
With helper text in a paragraph

Press CtrlS to save your progress instantly.

Inside Buttons

Enhance buttons by adding keyboard hints for accessibility and speed.

Within Input Groups

Show shortcuts directly inside input fields using hlmInputGroupAddon.

K
P

API Reference

Helm API

The Kbd component provides two main directives for keyboard styling.

DirectiveSelectorDescription
HlmKbd[hlmKbd]Styling for a single keyboard key.
HlmKbdGroup[hlmKbdGroup] Container to group and visually connect multiple keys.