Enabled, Disabled & Loading States
Reflect availability in your buttons.
Buttons Have Moods
A good button reflects reality: ready, blocked, or working. Compose lets you express these states so users always know what is possible. 🚦
The enabled Parameter
Every button takes an enabled flag. Set it to false and the button greys out and ignores taps automatically.
Button(
onClick = { submit() },
enabled = false
) { Text("Submit") }All lessons in this course
- Button and onClick
- Text, Outlined & Icon Buttons
- Enabled, Disabled & Loading States
- clickable on Any Composable