Toggle
On/off control for boolean settings. Two sizes, optional label and description.
import
{ Toggle } from "@pepulux/ui"Sizes
Small
Medium
With description
Email notificationsReceive a daily digest.
SMS alertsGet critical alerts via SMS.
Disabled
Feature locked
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| checked | boolean | — | Controlled checked state |
| defaultChecked | boolean | false | Uncontrolled default state |
| onChange | (checked: boolean) => void | — | Called when toggle changes |
| size | "sm" | "md" | "md" | Toggle track size |
| label | string | — | Label next to the toggle |
| description | string | — | Supporting text below label |
| disabled | boolean | false | Disables interaction |