Components/Toggle
Toggle
Two-state button that can be either on or off - useful for formatting tools and quick switches.
Installation
npx ajaxui add toggleSizes
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| pressed | boolean | - | Controlled pressed state. |
| defaultPressed | boolean | false | - |
| onPressedChange | (pressed: boolean) => void | - | - |
| variant | "default" | "outline" | "default" | - |
| size | "sm" | "md" | "lg" | "md" | - |