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 OverflowGitHub
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.
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
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
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
Built a tactile ON/OFF switch in React Native — fully customizable, no Lottie, just Reanimated ⚡️
Open-source More on reddit.com
Videos
React Native Custom Switch Using Reanimated 2
28:14
React Native Custom Animated Switch Button | Smooth & Stylish Toggle ...
React Native Switch Component Tutorial: How to Implement ...
React Native Tutorial - 61 - Switch
05:29
React Native Switch Component - How to Add On/Off Toggle for Settings ...
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 › 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
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> ); }
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.