Switch
Examples
Switch Props
The Switch component accepts the following props.
Name | Type | Required | Default | Description |
---|---|---|---|---|
id | string | '' | id for the label. | |
className | string | '' | Additional classes added to the Switch | |
label | string | '' | Text value for the label | |
isChecked | bool | true | Flag to show if the Switch is checked. | |
isDisabled | bool | false | Flag to show if the Switch is disabled. | |
onChange | func | () => undefined | A callback for when the Switch selection changes. (isChecked, event) => {} | |
aria-label | custom | '' | Adds accessible text to the Switch. |