OrbitSwitch
Track que pasa de color.field.control-track a color.primary.500
(nunca derivado/alpha), con el thumb deslizando en 180ms — la
transición exacta que especifica el motion spec de Orbit (“180ms
transforms: switch knob, drawer”).
Uso
<orbit-switch checked></orbit-switch><orbit-switch></orbit-switch>var checked by remember { mutableStateOf(true) }OrbitSwitch(checked = checked, onCheckedChange = { checked = it })Estados
<orbit-switch></orbit-switch><orbit-switch checked></orbit-switch><orbit-switch disabled></orbit-switch><orbit-switch checked disabled></orbit-switch>OrbitSwitch(checked = false, onCheckedChange = {})OrbitSwitch(checked = true, onCheckedChange = {})OrbitSwitch(checked = false, onCheckedChange = {}, enabled = false)OrbitSwitch(checked = true, onCheckedChange = {}, enabled = false)Props
| Prop | Tipo | Default | Descripción |
|---|---|---|---|
checked | boolean | — | Estado actual. |
onCheckedChange / evento change | (boolean) => void | — | Se dispara al hacer click/tocar. |
enabled / attr disabled | boolean | true | Habilita/deshabilita. |