Toggle Switch
On/off toggle with optional labels, state text, and keyboard accessibility.
Basic Toggle
Pre-checked
With On/Off Labels
Disabled
Toggle a switch to see output...
PHP PHP Methods (Fluent)
| Method / Property | Parameters | Description |
|---|---|---|
$m->toggleSwitch($id) | string | Create a toggle switch component. |
->name($name) | string | Form field name. |
->value($value) | string | Hidden input value when checked. |
->checked($checked) | bool | Set checked state (default: true). |
->disabled($disabled) | bool | Disable the toggle. |
->label($label) | string | Label text shown beside the switch. |
->onLabel($text) | string | Text shown when switch is ON. |
->offLabel($text) | string | Text shown when switch is OFF. |