When to use it
Use it for formatting or view options. Use a toggle switch for settings.
Turn one option on or off with a pressed-state button.
Native example
Use it for formatting or view options. Use a toggle switch for settings.
import androidx.compose.runtime.*
import com.santi020k.lumen.*
@Composable
fun FavoriteToggle() {
var favorite by remember { mutableStateOf(false) }
LumenToggleButton(
label = "Favorite",
pressed = favorite,
onPressedChange = { favorite = it },
icon = LumenIconName.Star
)
}Reference
The primary shared and platform-specific options exposed by LumenToggleButton.
| API | Values or type | Default | Description |
|---|---|---|---|
| pressed / label / icon | controlled state / name / leading icon | required / required / none | Use it for formatting or view options. |
Native behavior
Use it for formatting or view options. Use a toggle switch for settings.
Exposes pressed state; icon-only buttons keep the label as their name.
Shared component