Skip to main content
The toggle component allows you to interact with a boolean value using a switch UI.

Basic Usage

Available Methods

method
Controls the label position (inline or stacked).
method
Sets the icon displayed when toggled on.
method
Sets the icon displayed when toggled off.
method
Sets the color when toggled on.
method
Sets the color when toggled off.
method
Requires the toggle to be on.
method
Requires the toggle to be off.

Common Patterns

Feature Flag

With Icons

Status Toggle

Database Casting

When saving boolean values with Eloquent, add a boolean cast: