Toggle
A two-state button that can be either on or off.
Default
Click to toggle between pressed and unpressed states.
Pressed
A toggle that starts in the pressed state.
Variants
Default and outline variants.
Sizes
Small, default, and large sizes.
Disabled
A disabled toggle that cannot be interacted with.
Usage
julia
using Suite
Toggle("B")
Toggle(variant="outline", "I")
Toggle(pressed=true, "Bold")
Toggle(size="sm", disabled=true, "X")API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | String | "default" | "default" or "outline" |
| size | String | "default" | "default", "sm", or "lg" |
| pressed | Bool | false | Initial pressed state |
| disabled | Bool | false | Disable the toggle |
| class | String | "" | Additional CSS classes |
| children... | Any | - | Toggle content (text, icons) |