The Switch component is used as an alternative for the Checkbox component. Except indeterminate and label are not supported.
| Component Name | Development Status |
|---|---|
| Switch | DONE |
You can find all examples for components developed in this module here.
Very basic Switch component examples.
| Property Name | Type | Description |
|---|---|---|
| id | string | The id attribute of the checkbox. |
| name | string | The name attribute of the checkbox. |
| value | string | The value attribute of the checkbox. |
| checked | bool | When true, the switch is checked (on). |
| onChange - () => {} | func | Function called when state changes. |
| disabled - false | bool | When true, the switch is disabled. |
| hasCheckIcon - true | bool | When true, the switch has a check icon. |
| defaultChecked | bool | When true, the switch is true by default. This is for uncontrolled usage. |