0.2.0 • Published 5 years ago

@cmds/switch v0.2.0

Weekly downloads
8
License
MIT
Repository
-
Last release
5 years ago

Switch

npm package

Used for making a choice between yes and no.

Getting started

npm install @cmds/switch --save

Prop Types

PropertyTypeRequired?Description
idStringUnique identifier for the field
classNameStringAdd a className to the component
valueStringChecked / unchecked value
widthNumberSet the width of the switch. Default: 46
disabledBooleanPrevents the user from toggling the switch. Default: false
onChangeFunctionTriggers when the value changes: ({id: string, value: string})

More information

This component is designed and developed as part of Cosmos Design System.