You could create your own custom component with React Native. Just Inherit it and Create Own component like as https://github.com/arshigtx/react-native-custom-switch create a component copy inner src fix issues then make it your own. Please start the project.

----- Edited ------

https://snack-web-player.s3.us-west-1.amazonaws.com/v2/46/index.html?initialUrl=exp%3A%2F%2Fexp.host%2F%40snack%2Fsdk.46.0.0-HVS884TWR6&origin=https%3A%2F%2Fsnack.expo.dev&verbose=false

import React, { useState } from "react";
import { View, Switch, StyleSheet,Text } from "react-native";

const App = () => {
  const [isEnabled, setIsEnabled] = useState(false);
  const toggleSwitch = () => setIsEnabled(previousState => !previousState);

  return (
    <View style={styles.container}>
      <View>
      {
        isEnabled ? <Text style={{position: 'absolute', color: 'white', top: 3, left: 2, zIndex: 5, fontSize: 11}} >On</Text> : <Text style={{position: 'absolute', color: 'white', top: 3, left: 20, zIndex: 5, fontSize: 11}}>Off</Text>
      }
      <Switch
        trackColor={{ false: "#767577", true: "#81b0ff" }}
        thumbColor={isEnabled ? "#f5dd4b" : "#f4f3f4"}
        ios_backgroundColor="#3e3e3e"
        onValueChange={toggleSwitch}
        value={isEnabled}
      />
      </View>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: "center",
    justifyContent: "center",
  }
});

export default App;
Answer from Cafer YรผkseloฤŸlu on Stack Overflow
๐ŸŒ
React Native
reactnative.dev โ€บ docs โ€บ switch
Switch ยท React Native
April 8, 2026 - The value of the switch. If true the switch will be turned on.
๐ŸŒ
GitHub
github.com โ€บ prsn โ€บ react-native-toggle-switch
GitHub - prsn/react-native-toggle-switch: Toggle switch with label and swipe behaviour ยท GitHub
import ToggleSwitch from 'rn-toggle-switch' class Demo extends ... { ... render() { return ( ... <ToggleSwitch text={{on: 'PRESENT', off: 'ABSENT', activeTextColor: 'white', inactiveTextColor: '#B7B8BA'}} textStyle={{fontWeight: 'bold'}} color={{ indicator: 'white', active: 'rgba(32, 193, 173, 1)', inactive: 'rgba( 247, 247, 247, 1)', activeBorder: '#41B4A4', inactiveBorder: '#E9E9E9'}} active={true} disabled={false} width={80} radius={25} onValueChange={(val) => { /* your handler function...
Starred by 29 users
Forked by 19 users
Languages ย  JavaScript 64.1% | Objective-C 18.9% | Python 10.1% | Java 6.9%
Top answer
1 of 2
11

Finally I got the On off inside switch .......

install

npm install --save react-native-switch

    import { Switch } from 'react-native-switch';

<Switch
value={true}
onValueChange={(val) => console.log(val)}
disabled={false}
activeText={'On'}
inActiveText={'Off'}
backgroundActive={'green'}
backgroundInactive={'gray'}
circleActiveColor={'#30a566'}
circleInActiveColor={'#000000'}/>

Refer this link... https://github.com/shahen94/react-native-switch

2 of 2
4

I would start with something like this and then iterate and polish until it fulfills the requirements and looks good. This isn't a complete solution but should give you some ideas.

    import React from 'react';
    import { LayoutAnimation, StyleSheet, Text, TouchableOpacity, View } from 'react-native';

    const styles = StyleSheet.create({
      container: {
        width: 80,
        height: 30,
        backgroundColor: 'grey',
        flexDirection: 'row',
        overflow: 'visible',
        borderRadius: 15,
        shadowColor: 'black',
        shadowOpacity: 1.0,
        shadowOffset: {
          width: -2,
          height: 2,
        },
      },
      circle: {
        width: 34,
        height: 34,
        borderRadius: 17,
        backgroundColor: 'white',
        marginTop: -2,
        shadowColor: 'black',
        shadowOpacity: 1.0,
        shadowOffset: {
          width: 2,
          height: 2,
        },
      },
      activeContainer: {
        backgroundColor: 'blue',
        flexDirection: 'row-reverse',
      },
      label: {
        alignSelf: 'center',
        backgroundColor: 'transparent',
        paddingHorizontal: 6,
        fontWeight: 'bold',
      },
    });

    class LabeledSwitch extends React.Component {
      constructor(props) {
        super(props);
        this.state = {
          value: props.value,
        };
        this.toggle = this.toggle.bind(this);
      }
      componentWillReceiveProps(nextProps) {
        // update local state.value if props.value changes....
        if (nextProps.value !== this.state.value) {
          this.setState({ value: nextProps.value });
        }
      }
      toggle() {
        // define how we will use LayoutAnimation to give smooth transition between state change
        LayoutAnimation.configureNext(LayoutAnimation.Presets.spring);
        const newValue = !this.state.value;
        this.setState({
          value: newValue,
        });

        // fire function if exists
        if (typeof this.props.onValueChange === 'function') {
          this.props.onValueChange(newValue);
        }
      }
      render() {
        const { value } = this.state;

        return (
          <TouchableOpacity onPress={this.toggle}>
            <View style={[
              styles.container,
              value && styles.activeContainer]}
            >
              <View style={styles.circle} />
              <Text style={styles.label}>
                { value ? 'YES' : 'NO' }
              </Text>
            </View>
          </TouchableOpacity>
        );
      }
    }

    LabeledSwitch.propTypes = {
      onValueChange: React.PropTypes.func,
      value: React.PropTypes.bool,
    };

    LabeledSwitch.defaultProps = {
    };

    export default LabeledSwitch;
๐ŸŒ
npm
npmjs.com โ€บ package โ€บ toggle-switch-react-native
toggle-switch-react-native - npm
November 9, 2021 - Toggle Switch Component for react native, it works on Android, iOS and Web (react-native-web).
      ยป npm install toggle-switch-react-native
    
Published ย  Nov 09, 2021
Version ย  3.3.0
Author ย  aminebenkeroum
๐ŸŒ
GitHub
github.com โ€บ mymai91 โ€บ react-native-toggle-element
GitHub - mymai91/react-native-toggle-element: Switch toggle component for React Native. You can add title, icon, modify component for toggle button. ยท GitHub
import React, { useState } from "react"; import Toggle from "react-native-toggle-element"; const [toggleValue, setToggleValue] = useState(false); <Toggle value={toggleValue} onPress={(val) => setToggleValue(val)} /> <Toggle value={toggleValue} onPress={(newState) => setToggleValue(newState)} leftTitle="On" /> <Toggle value={toggleValue} onPress={(newState) => setToggleValue(newState)} leftTitle="Right" /> <Toggle value={toggleValue} onPress={(newState) => setToggleValue(newState)} leftTitle="Left" rightTitle="Right" />
Starred by 178 users
Forked by 20 users
Languages ย  TypeScript 99.7% | JavaScript 0.3%
๐ŸŒ
Swmansion
docs.swmansion.com โ€บ react-native-reanimated โ€บ examples โ€บ switch
Switch | React Native Reanimated
6 days ago - const Switch = ({ value, onPress, style, duration = 400, trackColors = { on: '#82cab2', off: '#fa7f7c' }, }) => { const height = useSharedValue(0); const width = useSharedValue(0); const trackAnimatedStyle = useAnimatedStyle(() => { const color = interpolateColor( value.value, [0, 1], [trackColors.off, trackColors.on] ); const colorValue = withTiming(color, { duration }); return { backgroundColor: colorValue, borderRadius: height.value / 2, }; }); const thumbAnimatedStyle = useAnimatedStyle(() => { const moveValue = interpolate( Number(value.value), [0, 1], [0, width.value - height.value] ); c
Find elsewhere
๐ŸŒ
GitHub
github.com โ€บ nithinpp69 โ€บ react-native-switch-toggles
GitHub - nithinpp69/react-native-switch-toggles: react Native customizable switch component library
import Switch from 'react-native-switch-toggles'; const [isEnabled, setIsEnabled] = React.useState(false); .... <Switch size={50} value={isEnabled} onChange={(value) => setIsEnabled(value)} renderOffIndicator={() => <Text style={{ fontSize: 16, color: 'white' }}>๐ŸŒš</Text>} renderOnIndicator={() => <Text style={{ fontSize: 16, color: 'white' }}>๐ŸŒ</Text>} /> <Switch size={50} value={isEnabled} onChange={(value) => setIsEnabled(value)} activeTrackColor={"#45D058"} renderOffIndicator={() => <Text style={{ fontSize: 16, color: 'white' }}>OFF</Text>} renderOnIndicator={() => <Text style={{ fontSize: 16, color: 'white' }}>ON</Text>} />
Starred by 19 users
Forked by 3 users
Languages ย  TypeScript 97.3% | JavaScript 2.2% | Shell 0.5% | TypeScript 97.3% | JavaScript 2.2% | Shell 0.5%
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ react native โ€บ how-to-create-a-toggle-switch-in-react-native-using-material-design-library
How to create a Toggle switch in react-native using Material Design library ? - GeeksforGeeks
July 29, 2024 - In ToggleSwitch.js , we will import Switch Component from 'react-native-paper' library . ... import React, {useState, useEffect} from 'react'; import { Text, View , StyleSheet, Alert} from 'react-native'; import { Switch} from 'react-native-paper' ; const ToggleSwitchExample = () =>{ const [switchOn, setSwitchOn] = useState(false) return( <View style ={styles.container}> <Text>Toggle Switch</Text> <Switch value={switchOn} onValueChange={() => { setSwitchOn(!switchOn) Alert.alert("Switch on : " + !switchOn)} }/> </View> ) } export default ToggleSwitchExample ; const styles = StyleSheet.create({ container:{ padding:45, flexDirection:'row', justifyContent:'space-around' } })
๐ŸŒ
GitHub
github.com โ€บ aminebenkeroum โ€บ toggle-switch-react-native
GitHub - aminebenkeroum/toggle-switch-react-native: Toggle Switch React Native Component works on both iOS and Android
Toggle Switch Component for react native, it works on Android, iOS and Web (react-native-web).
Starred by 237 users
Forked by 71 users
Languages ย  JavaScript 52.4% | Objective-C 27.8% | Starlark 10.9% | Java 8.9% | JavaScript 52.4% | Objective-C 27.8% | Starlark 10.9% | Java 8.9%
๐ŸŒ
About React
aboutreact.com โ€บ home โ€บ react native switch
Example of React Native Switch Component - About React
November 21, 2020 - Open App.js in any code editor and replace the code with the following code. //React Native Switch //https://aboutreact.com/react-native-switch/ //import React in our code import React, {useState} from 'react'; //import all the components we are going to use import { Switch, View, Text, SafeAreaView, StyleSheet } from 'react-native'; const App = () => { const [switchValue, setSwitchValue] = useState(false); const toggleSwitch = (value) => { //To handle switch toggle setSwitchValue(value); //State changes according to switch }; return ( <SafeAreaView style={{flex: 1}}> <View style={styles.container}> {/*To show Switch state*/} <Text> {switchValue ?
๐ŸŒ
Callstack
oss.callstack.com โ€บ switch
Switch | React Native Paper
import * as React from 'react'; import { Switch } from 'react-native-paper'; const MyComponent = () => { const [isSwitchOn, setIsSwitchOn] = React.useState(false); const onToggleSwitch = () => setIsSwitchOn(!isSwitchOn); return <Switch value={isSwitchOn} onValueChange={onToggleSwitch} />; }; export default MyComponent; ... Disable toggling the switch. ... Value of the switch, true means 'on', false means 'off'. ... Custom color for switch. ... Callback called with the new value when it changes.
๐ŸŒ
React Native Elements
reactnativeelements.com โ€บ switch
Switch | React Native Elements
Switch represents user's decision of a process and indicates whether a state is on/off. Switch is a controlled component that requires an onValueChange to update the value prop. This renders a boolean value. React native elements provide you with additional theme and color support in the Switch Button.
๐ŸŒ
ReactScript
reactscript.com โ€บ home โ€บ 10 best toggle switch components for react and react native (2026 update)
10 Best Toggle Switch Components for React And React Native (2026 Update) - ReactScript
January 13, 2026 - A highly customizable toggle button (switch) component for React applications. ... A lightweight yet fully customizable switch component for React Native.
Top answer
1 of 1
6

Hye finally i made a custom switch, do check out :

Do check out this expo https://snack.expo.dev/@gaurav1995/gnarly-sandwich

Its completely built with react native, no external libraries etc

Do lemme know in case of any doubts :)

import React, { useState, useRef } from 'react';
import {
  Text,
  View,
  StyleSheet,
  Animated,
  TouchableOpacity,
  Easing
} from 'react-native';


export default function App() {

    const positionButton = useRef(new Animated.Value(0)).current;

  const [isOn, setIsOn] = useState(false);

  const startAnimToOff = () => {
    Animated.timing(positionButton,{
      toValue:0,
      duration:500,
      easing:Easing.ease
    }).start()
  };

  const startAnimToOn = () => {
 Animated.timing(positionButton,{
      toValue:1,
      duration:500,
      easing:Easing.ease
    }).start()

  };

  const positionInterPol = positionButton.interpolate({inputRange:[0,1],outputRange:[0,30]})

  const backgroundColorAnim = positionButton.interpolate({inputRange:[0,1],outputRange:["#767577","#81b0ff"]})

  const initialOpacityOn = positionButton.interpolate({inputRange:[0,1],outputRange:[0,1]})

    const initialOpacityOff = positionButton.interpolate({inputRange:[0,1],outputRange:[1,0]})

  const onPress = () => {
    if (isOn) {
      startAnimToOff();
      setIsOn(false);
    } else {
      startAnimToOn();
      setIsOn(true);
    }
  };

  return (
    <View style={styles.container}>
      <TouchableOpacity style={{height:30,width:60}}  activeOpacity={0.9} onPress={onPress} >
      <Animated.View style={[styles.mainStyes,{
        backgroundColor:backgroundColorAnim
      }]} >
        <Animated.Text
          style={[
            styles.eahcStyles,
            {
              opacity: initialOpacityOn,
            },
          ]}>
          ON
        </Animated.Text>
        <Animated.Text
          style={[
            styles.eahcStylesOf,
            {
              opacity: initialOpacityOff,
            },
          ]}>
          OFF
        </Animated.Text>
        <Animated.View style={[styles.basicStyle,{
          transform:[{
            translateX:positionInterPol
          }]
        }]} />
          </Animated.View>
      </TouchableOpacity>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    backgroundColor: '#ecf0f1',
    padding: 8,
  },
  basicStyle: {
    height: 20,
    width: 20,
    borderRadius: 20,
    backgroundColor: '#FFF',
    marginTop: 5,
    marginLeft: 5,
  },
  eahcStyles: {
    fontSize: 14,
    color: '#f5dd4b',
    position: 'absolute',
    top: 6,
    left: 5,
  },

  eahcStylesOf: {
    fontSize: 14,
    color: '#f4f3f4',
    position: 'absolute',
    top: 6,
    right: 5,
  },
  mainStyes: {
    borderRadius: 30,
    backgroundColor: '#81b0ff',
    height: 30,
    width: 60,
  },

  paragraph: {
    margin: 24,
    fontSize: 18,
    fontWeight: 'bold',
    textAlign: 'center',
  },
});

๐ŸŒ
egghead.io
egghead.io โ€บ lessons โ€บ react-add-a-complete-toggle-with-react-native-switch
Add a Complete Toggle with React Native Switch | egghead.io
[00:00] Start by importing Switch from react-native. We'll then render our switch and pass in value={this.props.complete}. Now, when we refresh, we add an item, "This is a todo," to the list, we can see now there is a switch item being rendered, ...
Published ย  November 19, 2016
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ react native โ€บ react-native-switch-api
React Native Switch API - GeeksforGeeks
February 16, 2026 - - App Component: Wrap the Switch and Text with a View and return that inside the App function to render and place the toggle function and useState inside the App function, also make sure to export the App.
๐ŸŒ
MageComp
magecomp.com โ€บ home โ€บ react native โ€บ react native | switch
React Native | Switch
February 27, 2025 - The Switch component is a mainstay of the React Native library in React Native and aids in user interaction by performing a toggle action. With this versatile component, users can very smoothly switch between two very distinct states that represent an on/off or true/false condition.
๐ŸŒ
Peerlist
peerlist.io โ€บ blog โ€บ engineering โ€บ creating-custom-switch-component-in-react-native
Creating a Custom Toggle Switch Component in React Native
import { Pressable, View, Animated, SafeAreaView, StyleSheet, } from 'react-native'; import { useEffect, useState } from 'react'; import LinearGradient from 'react-native-linear-gradient'; we are using Pressable for handling user interactions, Animated for animations, and LinearGradient for gradient backgrounds. We have to define two sets of styles: defaultStyles for the switch in its default state and activeStyles for when the switch is toggled on.