Animated Switch Button For React Native

An animated and highly customizable on/off switch button component for React Native.

How to use it:

1. Install and import the switch-button.

$ npm i @freakycoder/react-native-switch-button --save

import SwitchButton from "@freakycoder/react-native-switch-button";

2. Add the switch-button component to the app and specify the path to inactive/active images as follows:

  onPress={(isActive: boolean) => console.log(isActive)}

3. All default component props.

style?: CustomStyleProp;
textStyle?: CustomTextStyleProp;
imageStyle?: CustomImageStyleProp;
textContainerStyle?: CustomTextStyleProp;
activeImageSource: ImageSourcePropType;
inactiveImageSource: ImageSourcePropType;
text?: string;
mainColor?: string;
tintColor?: string;
disableText?: boolean;
originalColor?: string;
onPress: (isActive: boolean) => void;


Animated Switch Button For React Native

Download Details:

Author: WrathChaos

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website:

License: MIT

You Might Be Interested In:


Add Comment