Did you know?dyk.si

Keyboard Key (kbd)

A small key-shaped box around a key name like Ctrl or ⌘ in instructions and shortcuts.

Also known as: kbd

<kbd>

When to use it

In instructions and shortcut lists.

Common mistake

Don’t show Mac symbols only to Windows users.

Accessibility

Write the key name in text; screen readers read <kbd> as normal text.

Name in code

HTML/CSS<kbd>
React<Kbd>
Jetpack ComposeSurface + Text (custom)
SwiftUIText + .background(RoundedRectangle)

Ready prompt for your coding agent

Add a Keyboard Key (kbd) to this screen. What it is: A small key-shaped box around a key name like Ctrl or ⌘ in instructions and shortcuts. Implement with: <kbd> (HTML/CSS). Accessibility: Write the key name in text; screen readers read <kbd> as normal text. When to use it: In instructions and shortcut lists. Avoid: Don’t show Mac symbols only to Windows users. Reuse the project's existing design tokens, spacing and component conventions.

Or compose a whole page from this element and others →

Prompts are in English for the most precise results with coding agents.