React native toggle component built with reanimated
npm install react-native-reanimated-toggleReact native toggle component built with react-native-reanimated
- [x] Built with Reanimated v2
- [x] Built with typescript
- [x] Customizable
- [ ] Support for gestures
sh
yarn add react-native-reanimated-toggle
`
`sh
npm install react-native-reanimated-toggle
`
Usage
$3
`jsx
import { View } from 'react-native';
import Toggle from 'react-native-reanimated-toggle';const App = () => {
const [toggled, setToggled] = useState(false);
return
}
`
$3
`jsx
import { View } from 'react-native';
import Toggle from 'react-native-reanimated-toggle';const App = () => {
const [toggled, setToggled] = useState(false);
return toggled={toggled}
onChange={setToggled}
thumbOffset={4}
activeTrackColor="orange"
trackStyle={{ height: 30, width: 48 }}
thumbSize={20}
/>
}
``For more examples check out expo project in /example folder.
MIT
Project bootstrapped with react-native-builder-bob