forms contract

IconButton

Square button rendering only an icon. For dense toolbars, table rows, and headers where a label would crowd the layout.

Variants

  • ghost
  • subtle
  • solid

Sizes

  • sm
  • md
  • lg

Slots

  • icon

Example

<IconButton variant="ghost" size="md" aria-label="Settings"><SettingsIcon /></IconButton>

Usage rule

`aria-label` is required and must describe the action, not the icon.

The full IconButton contract has 4 more rules and 1 more example, plus the do-not patterns. Get the full recipe.

Get the IconButton contract in your project.