Input
SKSwitch
SKSwitch is the preference toggle for settings surfaces. It animates thumb and track independently and supports an icon inside the thumb for state clarity in high-contrast mode.
Not yet released. SKSwitch is planned for 1.6.0; the current published release (1.4.0-alpha01) ships SKText and SKTextField only.
Usage
SKSwitch.kt
SKSwitch(
checked = syncEnabled,
onCheckedChange = { syncEnabled = it },
thumbIcon = SKIcons.Check
)Props
| Prop | Type | Default | Description |
|---|---|---|---|
| checked | Boolean | false | Toggle state. |
| onCheckedChange | (Boolean) -> Unit | — | State callback. |
| thumbIcon | SKIcon? | null | Optional icon drawn inside the thumb. |
Accessibility
Announces on/off state, honours reduced-motion, 48dp target.
Theming
Track and thumb colours pair from SKTheme.colors.
API surface
- SKSwitch