To achieve your first switch example you can look at react-native-switch and tweak it slightly to take a height and width (instead of circle size). I have a working example of this here.

For your second example a simple TouchableOpacity with toggle icon should suffice. You can get a little more elborate and add a color animation if you wanted.

Answer from TnR on Stack Overflow
🌐
GitHub
github.com › arshigtx › react-native-custom-switch
GitHub - arshigtx/react-native-custom-switch: A fully customizable switch component for react native. · GitHub
A lightweight, fully customizable switch component for React Native.
Starred by 33 users
Forked by 12 users
Languages   JavaScript
🌐
React Native
reactnative.dev › docs › switch
Switch · React Native
1 month ago - Color of the foreground switch grip. If this is set on iOS, the switch grip will lose its drop shadow. Custom colors for the switch track.
Discussions

reactjs - How would I make a Custom Switch and Toggle Like this In react Native - Stack Overflow
I am Trying to make a custom switch in react native expo but all the NPM's components don't seem to work, how would i come about creating a custom switch with animations and a custom toggle like th... More on stackoverflow.com
🌐 stackoverflow.com
reactjs - React Native Switch - Stack Overflow
Are there some ways in react-native to create a switcher with this exact design? I'm using this React Native Switch, it works perfect, but I need plus text 'on' and 'off', maybe custom component? ... More on stackoverflow.com
🌐 stackoverflow.com
toggle - Style React Native switch component - Stack Overflow
This project needs a custom button to provides a boolean type of input. But I have no idea how to create this kind of custom component for that. I did a research and I try to create this custom button with a react-native switch (import { Switch } from 'react-native';). More on stackoverflow.com
🌐 stackoverflow.com
Built a tactile ON/OFF switch in React Native — fully customizable, no Lottie, just Reanimated ⚡️
🌐 r/reactnative
3
42
August 11, 2025
🌐
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.
🌐
Swmansion
docs.swmansion.com › react-native-reanimated › examples › switch
Switch | React Native Reanimated
2 weeks 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
🌐
GitHub
github.com › Splicer97 › react-native-switch
GitHub - Splicer97/react-native-switch: Custom Switch component for React Native · GitHub
Custom Switch component for React Native that use Reanimated and Gesture Handler
Author   Splicer97
🌐
Medium
medium.com › zeeshaan786 › react-native-custom-switch-84f7d83cfad6
React Native Custom Switch | zeeshaan786
January 28, 2021 - This function will work for making switch On because the default active state is false (i.e.Off) and this function makes the default active state true (i.e.On).
Find elsewhere
🌐
GitHub
github.com › shahen94 › react-native-switch
GitHub - shahen94/react-native-switch: Customisable switch component for RN · GitHub
import { Switch } from 'react-native-switch'; export const App = () => ( <Switch value={true} onValueChange={(val) => console.log(val)} disabled={false} activeText={'On'} inActiveText={'Off'} circleSize={30} barHeight={1} circleBorderWidth={3} backgroundActive={'green'} backgroundInactive={'gray'} circleActiveColor={'#30a566'} circleInActiveColor={'#000000'} renderInsideCircle={() => <CustomComponent />} // custom component to render inside the Switch circle (Text, Image, etc.) changeValueImmediately={true} // if rendering inside circle, change state immediately or wait for animation to comple
Starred by 293 users
Forked by 169 users
Languages   JavaScript
🌐
npm
npmjs.com › package › react-native-switch
react-native-switch - npm
February 21, 2022 - import { Switch } from 'react-native-switch'; export const App = () => ( <Switch value={true} onValueChange={(val) => console.log(val)} disabled={false} activeText={'On'} inActiveText={'Off'} circleSize={30} barHeight={1} circleBorderWidth={3} backgroundActive={'green'} backgroundInactive={'gray'} circleActiveColor={'#30a566'} circleInActiveColor={'#000000'} renderInsideCircle={() => <CustomComponent />} // custom component to render inside the Switch circle (Text, Image, etc.) changeValueImmediately={true} // if rendering inside circle, change state immediately or wait for animation to comple
      » npm install react-native-switch
    
Published   Feb 21, 2022
Version   1.5.1
🌐
npm
npmjs.com › package › @minkyumdev › react-native-switch
@minkyumdev/react-native-switch - npm
January 27, 2026 - A production-ready, customizable React Native switch component built with react-native-reanimated for smooth 60fps animations.
      » npm install @minkyumdev/react-native-switch
    
Published   Jan 27, 2026
Version   1.0.4
🌐
GitHub
github.com › baderahmed › react-native-customisable-switch
GitHub - baderahmed/react-native-customisable-switch: A React Native module that allows you to customize switch (style, form and animation), availble for android and IOS. · GitHub
A React Native module that allows you to customize switch (style, form and animation), available for android and IOS.
Starred by 38 users
Forked by 28 users
Languages   JavaScript
🌐
GitHub
github.com › nithinpp69 › react-native-switch-toggles
GitHub - nithinpp69/react-native-switch-toggles: react Native customizable switch component library
<> <Text style={styles.label}>Simple Switch</Text> <Switch value={isEnabled} onChange={(value) => setIsEnabled(value)} /> </> <> <Text style={styles.label}>Switch with on/off indicator</Text> <Switch value={isEnabled} onChange={(value) => setIsEnabled(value)} activeTrackColor={'#45D058'} renderOffIndicator={() => ( <Text style={{ fontSize: 8, color: 'white' }}>OFF</Text> )} renderOnIndicator={() => ( <Text style={{ fontSize: 8, color: 'white' }}>ON</Text> )} /> </> <> <Text style={styles.label}>Switch with on/off thumb indicator</Text> <Switch size={40} value={isEnabled} onChange={(value) => s
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%
🌐
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
Top answer
1 of 1
3

I have made a custom switch in react native and You can do the styling in it a source code is given below -

import React from 'react'
import { Text, TouchableOpacity } from 'react-native'
import styled from 'styled-components/native'

class App extends React.Component {
  state = {
    active: false
  }
  handleOFF = () => {
    this.setState({
      active: false
    });

  }

  handleOn = () => {
    this.setState({
      active: true
    });
  }

  render() {
    return (
      <MainView>
        <Label>
          <LabelOff onPress={this.handleOFF} active={this.state.active} activeOpacity={0.8}>
            <Off>OFF</Off>
          </LabelOff>
          <LabelOn onPress={this.handleOn} active={this.state.active} activeOpacity={0.8}>
            <On>ON</On>
          </LabelOn>
        </Label>
      </MainView>
    )
  }
}


const MainView = styled.View`
  margin:50px;
`
const Label = styled.View`
  height:60px;
  width:240px;
  flex-direction:row;
  justify-content:space-around;
  align-items:center;
  background-color:transparent;
`

const LabelOff = styled.TouchableOpacity`
  height:60px;
  width:120px;
  background-color:${props => props.active ? 'transparent' : '#cb6161'};
  border:2px solid #cb6161;
  border-right-width:0px;
  align-items:center;
  justify-content:space-around;
`
const LabelOn = styled.TouchableOpacity`
  height:60px;
  width:120px;
  background-color:${props => props.active ? '#55acee' : 'transparent'};
  border:2px solid #55acee;
  border-left-width:0px;
  align-items:center;
  justify-content:space-around;
`
const Off = styled.Text`
  font-size:22px;
`
const On = styled.Text`
  font-size:22px;
`
export default App 

Custom switch is done !

🌐
React Native Archive
archive.reactnative.dev › docs › switch
Switch · React Native Archive
If true the user won't be able to toggle the switch. Default value is false. Custom colors for the switch track.
🌐
YouTube
youtube.com › watch
React Native Tutorial 26 - React Native Custom Switch Component - YouTube
Welcome to this course on React Native, React Native is used hybrid mobile app development. Facebook’s React Native user interface (UI) design which is de...
Published   November 18, 2021
🌐
Techup
techup.co.in › home › react-native › custom toggle switch in react native
Create Custom toggle switch in React Native - Building Digital Solutions
May 18, 2021 - import React, {useState} from 'react'; import {StyleSheet, Text, View, TouchableOpacity} from 'react-native'; import CustomSwitch from './CustomSwitch'; export default function Dashboard({navigation}) { const onSelectSwitch = index => { alert('Selected index: ' + index); }; return ( <View style={{alignItems: 'center'}}> <Text style={{fontSize: 25, margin: 20, textAlign:'center'}}> React native switch selection button </Text> <View style={{alignItems: 'center', margin: 20}}> <CustomSwitch selectionMode={1} roundCorner={true} option1={'First'} option2={'Second'} onSelectSwitch={onSelectSwitch} selectionColor={'blue'} /> </View> <View style={{alignItems: 'center', margin: 20}}> <CustomSwitch selectionMode={2} roundCorner={false} option1={'Option1'} option2={'Option2'} onSelectSwitch={onSelectSwitch} selectionColor={'red'} /> </View> </View> ); }
🌐
GeeksforGeeks
geeksforgeeks.org › react native › react-native-switch-api
React Native Switch API - GeeksforGeeks
February 16, 2026 - The React Native Switch API is a core component used to toggle between two states, typically on and off. It is commonly used in settings screens for enabling or disabling features like notifications, dark mode, etc.
🌐
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.