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

toggle-switch-react-native

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

toggle-switch-react-native

Toggle Switch component for react native, it works on iOS and Android.

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Toggle Switch Component for react native, it works on iOS and Android.

Content

  • Installation
  • Demo
  • Getting started
  • API
  • Contribution

Installation

  • 1.Run npm i toggle-switch-react-native --save
  • 2.import ToggleSwitch from 'toggle-switch-react-native'

Demo

Screenshots

Getting started

To Get Started, Import toggle-switch-react-native to your js file.

import ToggleSwitch from 'toggle-switch-react-native'

Inside your component's render method, or any other method returning views, use ToggleSwitch:

<ToggleSwitch
    isOn={false}
    onColor='green'
    offColor='red'
    label='Example label'
    labelStyle={{color: 'black', fontWeight: '900'}}
    size='large'
/>;

API

PropsTypeOptionalDefaultDescription
isOnBooleantrue'false'Default state, true for On, false for off
onColorStringtrue'#634fc9'On Color
offColorStringtrue'#ecf0f1'Off Color
labelStringtrueCustom Label Text on the Left of the toggle Button
labelStyleObjecttrue{marginHorizontal: 10}Custom Styling for the Label Text View
sizeStringtrue'medium'Size of the toggle switch button ( 'large', 'medium', 'small')

Contribution

If you encountered an Issue, please add a screenshot of the bug or a code snippet.

Quickest way to solve issue is to reproduce it on the example project

Pull requests are welcome. If you want to change the API or imporove something, feel free to create an issue and discuss it first.


MIT Licensed

Keywords

FAQs

Package last updated on 21 Oct 2017

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