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

PropTypeDefaultDescription
variantString"default""default" or "outline"
sizeString"default""default", "sm", or "lg"
pressedBoolfalseInitial pressed state
disabledBoolfalseDisable the toggle
classString""Additional CSS classes
children...Any-Toggle content (text, icons)