1 | |
A switch (track + thumb) with an optional label — a real checkbox in forms, or an `<a role="switch">` link for Turbo-driven view swaps.
| Prop | Type | Default |
|---|---|---|
checked
On (ON track green, thumb shifted right).
|
Boolean | false |
label
Optional text after the switch, rendered as a LabelComponent; nil → switch only.
|
String | nil |
info
Passed to the Label — shows its trailing info icon.
|
Boolean | false |
href
When present, renders an `<a role="switch">` link instead of a checkbox.
|
String | nil |
name
Checkbox `name` (form mode only).
|
String | nil |
disabled
Disables the control (dims it, no interaction).
|
Boolean | false |
**html_options
Extra HTML attributes on the root (data-*, aria-*, …).
|
Hash | — |