Skip to content
Actions

Icon Button

Standard, filled, outlined, and toggle icon buttons

Icon buttons trigger a single action with a compact, recognizable glyph. They come in standard, filled, and outlined styles, plus a toggleable variant.

Icon Button demos rendered in Compose Playground
Pixel-accurate preview · light theme
2 examples StylesToggle

Examples

01

Styles

Kotlin
IconButton(onClick = {}) { Icon(Icons.Filled.Favorite, "Favorite") }
FilledIconButton(onClick = {}) { Icon(Icons.Filled.Share, "Share") }
OutlinedIconButton(onClick = {}) { Icon(Icons.Filled.Edit, "Edit") }
02

Toggle

An IconToggleButton flips between checked and unchecked.

Kotlin
var checked by remember { mutableStateOf(false) }
IconToggleButton(checked = checked, onCheckedChange = { checked = it }) {
    Icon(Icons.Filled.Favorite, if (checked) "Liked" else "Not liked")
}