| switch_toggle |
component |
ts |
ui |
1.0.0 |
impure |
SwitchToggle(props: SwitchToggleProps): JSX.Element |
Toggle on/off accesible con label opcional a izquierda o derecha. Base-UI Switch primitive. |
| switch |
| toggle |
| component |
| ui |
| interactive |
| form |
| base-ui |
|
|
|
|
false |
|
|
false |
|
|
frontend/functions/ui/switch_toggle.tsx |
| name |
type |
required |
description |
| label |
string |
false |
Texto de etiqueta visible junto al switch |
|
| name |
type |
required |
description |
| labelPosition |
'left' | 'right' |
false |
Posicion del label respecto al switch (default: right) |
|
| name |
type |
required |
description |
| checked |
boolean |
false |
Estado controlado del toggle |
|
| name |
type |
required |
description |
| defaultChecked |
boolean |
false |
Estado inicial no controlado |
|
| name |
type |
required |
description |
| disabled |
boolean |
false |
Deshabilita el toggle |
|
| name |
type |
required |
description |
| onCheckedChange |
(checked: boolean) => void |
false |
Callback cuando cambia el estado |
|
|
|
false |
react |
|