Switch
Interrupteur on/off avec animation de transition. Implemente en HTML natif (input checkbox + label) pour une accessibilite maximale. Zone de clic elargie a 44px pour les cibles tactiles.
Preview
Etat active
Disabled
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| checked | boolean | — | Etat active/desactive du switch. |
| onCheckedChange | (checked: boolean) => void | — | Callback appele quand l'etat change. |
| activeColor | string | — | Si defini, utilise bg-green-500 quand le switch est active au lieu de bg-primary. |
| disabled | boolean | false | Desactive le switch. |
| id | string | — | ID HTML pour lier le switch a un label via htmlFor. |
| className | string | — | Classes CSS additionnelles appliquees au label interne. |