text-toggler

React native toggle utilizing text and a moving layer as selectors

Usage no npm install needed!

<script type="module">
  import textToggler from 'https://cdn.skypack.dev/text-toggler';
</script>

README

react-native-text-toggle

How it looks

Why does this exist?

I wanted a component that does exactly this and figured I could also open source it to help others

To install simply run

npm install react-native-text-toggle

or

yarn add react-native-text-toggle

To use

import TextToggler from 'react-native-text-toggle

<TextToggler 
options={['option 1', 'option 1',]} 
onToggle={(value) => console.log(value)} />

You can also customize the look by using the following props

containerStyle

textStyle