React native iOS switch component that can be used in android and iOS projects with active and inactive color customization and cool iOS toggle animation .
$ npm install --save react-native-switch-ios
or
yarn add react-native-switch-ios
or
pnpm add react-native-switch-ios
import { useState } from "react"; import { Switch } from "react-native-switch-ios"; export const App = () => { const [toggle, setToggle] = useState(false); return ( <Switch inactiveBgColor="#7d7d7d" activeBgColor="#34c759" isOn={toggle} onToggle={() => setToggle((prev) => !prev)} /> ) };