Toggle

Attribute Type Documentation Default Value
id :any

HTML id attribute

class :any

Additional CSS classes

variant :string

Visual style variant

color :string

Color variant

size :string

Size variant

vertical :boolean

Vertical layout

false
exclusive :boolean

Only one item can be active (radio-like)

false
full :boolean

Full width

false
label :string

Accessible label for the toggle group (aria-label)

rest :global
Required item * :slot

Toggle button items

Show slot attributes Hide slot attributes
active :boolean

Whether this item is active/selected

disabled :boolean

Whether this item is disabled

value :string

Value for this toggle

icon :string

MDI icon name

icon_only :boolean

Icon-only button (no text)

class :any

Additional CSS classes

label :string

accessible label for icon-only items (aria-label)

<:item active={true}>Top</:item>
<:item>Middle</:item>
<:item>Bottom</:item>