Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

1mehdifaraji/react-native-switch-ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

4 Commits

Repository files navigation

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)} 
 />
 )
};

Developer

@1mehdifaraji

AltStyle によって変換されたページ (->オリジナル) /