npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-native-full-switch

v1.1.3

Published

A simple and fully customizable React Native component that implements a switch (toggle) for android and ios, that also support in RTL.

Downloads

23

Readme

PRs Welcome

react-native-full-switch

A simple and fully customizable React Native component that implements a switch (toggle) for android and ios, that also support in RTL.

Example :-------------------------: example

Installation

If using yarn:

yarn add react-native-full-switch

If using npm:

npm i react-native-react-native-full-switch

##Usage

import Switch from 'react-native-full-switch'
...

const [checked, setChecked] = useState(false)
...

<Switch
    isOn={checked}
    onChange={isOn => setChecked(isOn)}
    />

Documentation

| Name | Description | Default | Type | |-----------------------|----------------------------------------|---------|---------| | isOn | Require, determine if the Switch is on | false | Boolean | | onChange | Require, a function that returns the new state of the switch after a press | | Function | | trackWidth | The width style property of the track | 40 | Number | | trackHeight | The height style property of the track | 24 | Number | | curserWidth | The width style property of the curser | 20 | Number | | curserHeight | The height style property of the curser| 20 | Number | | space | The space of the curser from the beginning and the end of the track | 3 | Number | | disable | Disable the Switch for touch | false | Boolean | | opacity | Opacity of the press. number between 0 to 1 | 0.8 | Number | | trackOnColor | The color of the track on on state | "rgb(78,209,100)" | String | | trackOffColor | The color of the track on off state | "rgb(223,223,223)" | String | | vertical | Change the animation to vertical | false | Boolean | | text | Text to show on the track | "" | String | | textStyle | A custom style for the text | | Style object | | reversed | Revers the direction of the animation | false | Boolean | | trackStyle | A custom style for the track | | Style object | | curserOnColor | The color of the curser on on state | white | String | | curserOffColor | The color of the curser on off state | white | String | | curserStyle | A custom style for the curser | | Style object | | disableOnCurserColor | Disable color of the curser in on state | "rgb(233,233,233)" | String | | disableOffCurserColor | Disable color of the curser in off state| "rgb(233,233,233)" | String | | duration | The duration of the animation in milliseconds | 500 | Number |
| disableOnTrackColor | Disable color of the track on on state | "rgba(78,209,100, 0.6)" | String | | disableOffTrackColor | Disable color of the track on off state | "rgba(223,223,223,0.6)" | String | | renderChildCurser | Render a custom child component to the curser | | Component |

Contributing

Pull requests are always welcome! Feel free to open a new GitHub issue for any changes that can be made.

License

MIT