@cmds/switch
v0.2.0
Published
Used for making a choice between yes and no.
Downloads
8
Readme
Switch
Used for making a choice between yes and no.
Getting started
npm install @cmds/switch --saveProp Types
| Property | Type | Required? | Description |
|:---|:---|:---:|:---|
| id | String | | Unique identifier for the field |
| className | String | | Add a className to the component |
| value | String | ✓ | Checked / unchecked value |
| width | Number | | Set the width of the switch. Default: 46 |
| disabled | Boolean | | Prevents the user from toggling the switch. Default: false |
| onChange | Function | | Triggers when the value changes: ({id: string, value: string}) |
More information
This component is designed and developed as part of Cosmos Design System.
