Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Android docs
FormsAndroid

Toggle

Present a labeled native switch with Lumen brand tint.

Public APILumenToggleAndroid / Compose

Native example

Use Toggle

Use for an immediately applied Boolean setting. Use a button when an action does not represent persistent on/off state.

Toggle rendered in the Android phone emulator Lumen playground
Verified runtime captureAndroid phone emulator
kotlin
LumenToggle(
    label = "Automatic updates",
    checked = automaticUpdates,
    onCheckedChange = ::setAutomaticUpdates
)

Reference

Public API

The primary shared and platform-specific options exposed by LumenToggle.

APIValues or typeDefaultDescription
checkedBooleanRequiredStores native on/off state.
labelStringRequiredProvides the visible and accessible label.
onCheckedChange(Boolean) -> UnitRequiredUpdates the controlled state.
showLabelBooleantrueCan visually hide a repeated label while preserving its accessible name.
enabledBooleantrueControls native disabled state.

Native behavior

Design and accessibility

When to use it

Use for an immediately applied Boolean setting. Use a button when an action does not represent persistent on/off state.

Accessibility

The visible label and native switch expose standard platform state and activation behavior.

Shared component

Available on other platforms

React NativeApple / SwiftUI
Android docsCompose module