1 contributor
Like
Install switch as a package?
Copied
npm i @bit/segmentio.evergreen.switch
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
modifieddraft
chevron_left
chevron_right
Properties
Name | Type | Default value | Description |
---|---|---|---|
id | string | The id attribute of the radio. | |
name | string | The name attribute of the radio. | |
value | string | The value attribute of the radio. | |
height | number | 16 | The height of the switch. |
checked | bool | When true, the switch is checked (on). | |
onChange | function | () => {} | Function called when state changes. |
disabled | bool | false | When true, the switch is disabled. |
isInvalid | bool | When true, the switch is invalid. | |
appearance | string | 'default' | The appearance of the checkbox. The default theme only comes with a default style. |
hasCheckIcon | bool | true | When true, the switch has a check icon. |
defaultChecked | bool | When true, the switch is true by default. This is for uncontrolled usage. | |
theme (required) | object | Theme provided by ThemeProvider. |