Toggle Switch
Un interruptor representa un interruptor físico que permite elegir entre dos opciones mutuamente excluyentes. Por ejemplo, 'On/Off' y 'Show/Hide'. Elegir una opción debe producir un resultado inmediato.
Uso
<script>
import { ToggleSwitch } from 'fluentui-svelte';
</script>
<ToggleSwitch aria-label="Notifications" />
<ToggleSwitch label="Toggle me" />
<ToggleSwitch label="I'm disabled" disabled /> Estados
Un toggle switch puede tener etiqueta, estar activado o estar deshabilitado.
Propiedades del componente
| Name | Type | Default | Description |
|---|---|---|---|
checked bindable | boolean | null | Si el switch está encendido. | |
ref bindable | HTMLInputElement | null | La referencia DOM del elemento de entrada. | |
label | string | La etiqueta que se muestra junto al elemento input. Dentro de un Label, no se renderiza | |
wrapperAttributes | HTMLAttributes | Los atributos que se aplican al elemento wrapper. | |
wrapperRef bindable | HTMLDivElement | null | La referencia DOM del elemento contenedor. | |
Element Attributes (input) |

