Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Kbd examples · With Icons

Unicode Symbols Kbd for React

Enter, Delete and Tab keys with a Unicode symbol before each name.

Framework
UI library

Key symbols don't need an icon library: Unicode has them. This React example shows ↵ Enter, ⌫ Delete and ⇥ Tab as three Kbd caps in a row, each symbol typed straight into the text before the key's name.

Preview

Preview width
↵ Enter⌫ Delete⇥ Tab

Installation

Sign in to get your install command
Free with an account. It carries your token, so the CLI installs everything in one go.

FAQ

Why Unicode symbols instead of icons?

They're plain text: no import, no extra markup, and they take the cap's font, size and color. They also work anywhere text does, like Markdown docs or a plain-text tooltip.

Which Unicode symbols are standard for keys?

⌘ Command (U+2318), ⌥ Option (U+2325), ⌃ Control (U+2303), ⇧ Shift (U+21E7), ↵ Return (U+21B5), ⌫ Delete (U+232B), ⇥ Tab (U+21E5) and ⎋ Escape (U+238B), plus the arrows ← ↑ → ↓.

Do the symbols look the same everywhere?

Not quite: each comes from whatever font has it, so its size and weight vary between systems. If they must match exactly, use icons, as the Enter with Icon example does.

Do screen readers read the symbols?

Inconsistently: some say the Unicode name, some skip the symbol. Here the key name follows each symbol, so the meaning gets through either way.

Can I use these symbols in Markdown?

Yes, they're ordinary characters. Inside a Kbd they get the key cap style; in Markdown they're plain text, or key caps if your renderer styles kbd elements.

Do the symbols work in every language?

The symbols do, which is their advantage. The names after them don't, so translate Enter, Delete and Tab with the rest of your interface, or use the names printed on local keyboards.