IconButton
A 48 × 48 dp icon-only button with a 24 dp stroke icon, used in bars, trays, rows (⋮) and dialog headings (×).
Consumer provides: the icon, a content description that says what it does ("Delete page", "More actions for kubernetes"), the selected/pressed state where it is a tool, and the click handler.
States
- Default:
inkicon, no background. - Selected tool / open trigger: a 36 dp
selected-tool-boxofsage-selectedwith a 2 dpforestoutline behind aforesticon. Use it for the active pen, the open » tray, a ⋮ whose menu is open, Lock zoom when on. - Destructive:
urgenticon (Delete page) — on both devices. - Disabled:
outlineicon, not focusable.
Rules
- Never smaller than 48 dp; icons stay 24 dp.
- Selected tools are exposed as
Role.Tabwithselected = true; toggles asaria-pressed. - Don't add text labels under bar icons; the content description carries the name.
Compose
IconButton (48 dp) with a custom indication-free selected background: Box(Modifier.size(36.dp).background(sageSelected, RoundedCornerShape(8.dp)).border(2.dp, forest, RoundedCornerShape(8.dp))).
In the app
MenuBarButton and MenuBarIcon.
- Menu triggers (», ⋮, Pen presets) pass
openand are exposed as buttons with an Expanded or Collapsed state. - There is no outlined icon-button variant.
- The sync status glyphs are described in Sync and account.
Preview
Default · selected tool · destructive · disabled