<Switch />

Switch component. The switch can be toggled both by dragging and tapping. Will automatically displays a Material Design switch on Android devices.

Usage

<Switch checked={this.state.checked} onChange={this.onChange} />
Name Type Description
modifier string The appearance of the checkbox. Optional.
onChange func Called when the value of the switch changes (checked/unchecked) Optional.
checked bool Whether the switch is checked. Optional.
defaultChecked bool Defined the state of the switch at first render for uncontrolled inputs. Optional.
disabled bool If set, the switch is disabled. Optional.
inputId string Specify the id attribute of the inner <input> element. This is useful when using <label for="..."> elements. Optional.
Name Description
material Material Design switch

Need Help?

If you have any questions, use our Community Forum or talk to us on Discord chat. The Onsen UI team and your peers in the community will work together to help solve your issues.

For bug reports and feature requests use our GitHub Issues page.