@siliconjungles/react-native-simple-toggle-button

Simple Toggle button component for react-native

Usage no npm install needed!

<script type="module">
  import siliconjunglesReactNativeSimpleToggleButton from 'https://cdn.skypack.dev/@siliconjungles/react-native-simple-toggle-button';
</script>

README

React Native Simple Toggle Button

Adapted from https://github.com/ashishpandey001/react-native-flip-toggle-button

Usage

  • yarn add react-native-simple-toggle-button or npm install react-native-simple-toggle-button --save
<ToggleButtonComponent
  value={useQr}
  leftText="Left"
  rightText="Right"
  buttonWidth={250}
  buttonHeight={50}
  buttonRadius={50}
  sliderWidth={125}
  onToggle={(newState) => this.setState({ useQr: newState })}
/>