Skip to content

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

Free

Delete with Icon Kbd for Vue

A Del cap with a delete icon before the label. The icon is decorative, and the key does not delete anything.

UI library: Ark UI

One cap shows a delete icon, hidden from assistive tech, then the label Del. It sits in a group of one. There is no delete handler.

Use Del when you mean the Delete key, and say Backspace if you mean that one. If the action cannot be undone, confirm in an Alert Dialog. In Vue, Ark UI does not delete on this key.

Preview

Preview width

Installation

MCP · Pro
Make your AI a shadcn expert
Your agent installs components, builds pages and restyles your app from one prompt, in Claude Code, Cursor or VS Code.
Part of Pro

Anatomy

Kbd anatomy: kbd, group

Usage

<div class="rounded-md border bg-background p-4">
  <KbdGroup><Kbd><DeleteIcon aria-hidden="true" />Del</Kbd></KbdGroup>
</div>

FAQ

Does this icon mean Delete or Backspace?

Lucide's Delete icon is a key shape pointing back with an X in it, like the ⌫ symbol, which usually means Backspace. Here it's paired with Del, so the label decides; for Backspace, change the label.

Should I document Delete and Backspace separately?

Yes, if both do something. Backspace removes the character before the cursor and Delete the one after it. On Mac, the key labeled delete is Backspace, and Fn delete is forward delete.

Should the delete key look destructive?

A Kbd is a label for a key, so keep it neutral. Put the warning on the action: a destructive Button or menu item next to the shortcut.

How do I make the delete key accessible?

The icon is hidden with aria-hidden, and the text Del is what screen readers read. Writing Delete in full, or adding it as visually hidden text, avoids the abbreviation.

Should the Delete key ask for confirmation?

For things that can't be undone, yes: open an Alert Dialog. For things that can, delete right away and offer undo; it's faster and just as safe.

Is the Delete key labeled the same everywhere?

No. German keyboards say Entf, French ones Suppr, and many Mac keyboards show only a symbol. The icon helps people recognize the key whatever its label.

API Reference

Kbd

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