Switch
Toggle accesible para activar o desactivar opciones.
pnpm dlx nuvo-ui add switchBásico
Recibe alertas en tiempo real.
Ofertas y novedades del producto.
Sin label
Uso
import { Switch } from "@nuvo-ui/ui"
<Switch
checked={active}
onCheckedChange={setActive}
label="Activar feature"
description="Esta opción afecta a todos los usuarios."
/>Props
| Prop | Tipo | Default | Descripción |
|---|---|---|---|
| checked | boolean | — | Estado controlado |
| defaultChecked | boolean | — | Estado inicial (no controlado) |
| onCheckedChange | (v: boolean) => void | — | Callback al cambiar |
| label | string | — | Etiqueta del switch |
| description | string | — | Texto descriptivo |
| disabled | boolean | false | Deshabilita el control |