Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Unicode Symbols Kbd for Ark UI

Enter, Delete, and Tab caps that each lead with a Unicode symbol and then the key name, in a row of three.

Three caps in a row read ↵ Enter, ⌫ Delete, and ⇥ Tab. The symbol and the name are one label. Nothing listens for the keys.

Use the characters when you do not want an icon. Icons stay steadier across fonts. A Tooltip can spell the action if a symbol is ambiguous. In React, Ark UI does not read the symbols as keys.

Preview

Preview width

Installation

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

Anatomy

Kbd anatomy: kbd, group

Usage

<div className="rounded-md border bg-background p-4">
  <div className="flex gap-1">
    <Kbd>↵ Enter</Kbd>
    <Kbd>⌫ Delete</Kbd>
    <Kbd>⇥ Tab</Kbd>
  </div>
</div>

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.

API Reference

Kbd

No extra props in this demo. The rest is on the Kbd page.