Components
Toggle sidebar

Toggle

Turn a setting on or off using a compact, button-shaped control.

Use a toggle for icon-sized settings and modes. Use a switch when the setting needs a visible label.
Fast mode
Copy to clipboard
<flux:toggle wire:model.live="fastMode" icon="bolt" tooltip="Fast mode" />

Sizes

Use the size prop to fit toggles into different interface densities.

Fast mode
Fast mode
Fast mode
Copy to clipboard
<flux:toggle icon="bolt" /><flux:toggle icon="bolt" size="sm" /><flux:toggle icon="bolt" size="xs" />

Variants

Choose a treatment that matches the surrounding controls.

Default
Filled
Ghost
Subtle
Copy to clipboard
<flux:toggle icon="bolt" /><flux:toggle icon="bolt" variant="filled" /><flux:toggle icon="bolt" variant="ghost" /><flux:toggle icon="bolt" variant="subtle" />

Color

Use the color prop to customize the active state. The inactive state remains neutral.

Fast mode
Favorite
Notifications
Approved
Enhance
Copy to clipboard
<flux:toggle icon="bolt" color="blue" checked /><flux:toggle icon="heart" color="red" checked /><flux:toggle icon="bell" color="amber" checked />

With text

Add short text when the setting benefits from a persistent visible label.

Fast mode
Copy to clipboard
<flux:toggle icon="bolt">Fast mode</flux:toggle>

Reference

flux:toggle

Prop
Description
wire:model
Binds the toggle's checked state to a Livewire property.
icon
Icon name. The outline icon is shown when off and the solid icon when on.
size
Control size. Options: base (default), sm, or xs.
variant
Visual treatment. Options: outline (default), filled, ghost, or subtle.
color
Color of the active icon. The inactive state and control surface remain neutral. Defaults to the application's accent color.
tooltip
Tooltip text. Recommended for icon-only toggles because it also supplies the accessible name.
checked
Sets the initial checked state when not using wire:model.
disabled
Prevents user interaction with the toggle.
Attribute
Description
data-flux-toggle
Applied to the root element for styling and identification.
data-checked
Applied when the toggle is on.
Copyright © 2026 Wireable LLC ·Terms of Service
Built with by
Caleb Porzio and Hugo Sainte-Marie