0.5.0 • Published 6 years ago
@pndr/switch v0.5.0
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.