Toggle
A two-state button that can be either on or off.
Requires JS
This component requires the toggle
stimulus controller.
API Reference
Toggle
Name | Type | Default |
---|---|---|
variant: | symbol | :default |
Visual style variant. Options: :default | :outline | ||
size: | symbol | :default |
Options: :default | :sm | :lg | ||
on: | boolean | false |
Whether the toggle should be in the active/pressed state when initially rendered. | ||
attributes | keyword arguments |
Examples
On This Page