Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-toggle-input

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-toggle-input

⭐ Customizable toggle button input for React Native and Expo

  • 1.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
77
increased by126.47%
Maintainers
1
Weekly downloads
 
Created
Source
NPM VERSIONNPM WEEKLY DOWNLOADSGITHUB STARYOUTUBE VIEWSNPM LIFETIME DOWNLOADS

🔛 React Native Custom Toggle Input

🟢 Customizable React Native Toggle Switch with easy to use props"


Toggle Input Demo

Customizable and Easy to use toggle switch.
  • Use the color of your choice
  • Use bordered or filled toggle switch upon your choice
  • Works on all the platforms Android, Ios and Web in the same way
  • Zero dependencies

Compatibility

iOSAndroidWebExpo

🔌 Installation

$ npm install react-native-toggle-input

OR

$ yarn add react-native-toggle-input

😎 Basic Usage

import Toggle from 'react-native-toggle-input'

const App = () => {

  const [toggle, setToggle] = React.useState(false);
  

  return(
    <Toggle toggle={toggle} setToggle={setToggle} />
  )

};

For Live Demo (Expo Snack)

⭐ Props

NameTypeDescription
colorStringColor of the toggle switch (Optional)
sizeNumberSize of the toggle switch (Optional)
filledbooleanIf you want to use filled toggle switch set it to true (Optional)
circleColorStringUse the color you want to give to the circle inside swith (Required for filled switch)
togglebooleanDefault value of the toggle switch (Required)
setToggleFunctionPass the function that will be used to set toggle status (Required)
onTrueFunctionPass the function that will executed after the switch has been turned on
onFalseFunctionPass the function that will executed after the switch has been turned off

😎 Advanced Usage

import Toggle from 'react-native-toggle-input'

const App = () => {

  const [toggle, setToggle] = React.useState(false);
  

  return(
    <Toggle 
        color={"#4C956C"}
        size={30}
        filled={true}
        circleColor={"white"}
        toggle={toggle}
        setToggle={setToggle}
    />
  )

};


Toggle Input Filled Demo

▶️ Watch Tutorial Video

Watch video

For Live Demo (Expo Snack)

Keywords

FAQs

Package last updated on 15 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc