Skip to main content
  1. Docs
  2. Components
  3. Actions

Icon button

An action shown as an icon. Its name is required, and shows as its tooltip.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<button>Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • A familiar action in a tight space: a toolbar, a row, a card's corner.
  • The same action on every row of a list.
  • Close, more, edit, copy.
Not for

02

Anatomy

  1. 1icon-button<button>The root: square, a native button.
  2. 2button-icon<svg>Sharp. 16px; 20px at lg.

03

Do and don't

A name for every icon
Doaria-label names it, and its tooltip shows the name.
Don'tAn icon alone, with no name to read.
Icons people know
DoEdit, copy, delete, settings: read at a glance.
Don'tIcons that must be learned.
Ghost in a toolbar
DoNeutral ghosts: the content leads.
Don'tA row of solids: every action shouts.
Words for what can't be undone
DoThe main destructive action says what it does.
Don'tA lone bin as the page's main action.

04

Sizes

Each height follows the region's density.

SizeSquare: compact / default / comfortableIcon
sm24 / 28 / 3216px
md28 / 32 / 3616px
lg32 / 40 / 4420px

05

Content

  • Name the action and its object: "Edit Priya Sharma", not "Edit".
  • Sentence case; the tooltip shows the name as written.
  • Say why it's disabled in the name: "Delete workspace: only an owner can".
Next — Icon buttonAPI