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

Rules

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.

Preview

Default · selected tool · destructive · disabled