react-native-switch-ios
v1.0.1
Published
React native iOS switch component
Downloads
107
Maintainers
Readme
react-native-switch-ios
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 .
Preview
Installation
$ npm install --save react-native-switch-ios
or
yarn add react-native-switch-ios
or
pnpm add react-native-switch-ios
Usage
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)}
/>
)
};