Socket
Socket
Sign inDemoInstall

react-native-radio-button

Package Overview
Dependencies
494
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-radio-button

Just a simple radio button


Version published
Weekly downloads
863
decreased by-20.83%
Maintainers
1
Install size
211 kB
Created
Weekly downloads
 

Readme

Source

React-Native Radio Button

Just a simple radio button for React-Native.

Install it with NPM...

  • Run npm install --save react-native-radio-button
  • Require it with import RadioButton from 'react-native-radio-button'

...or just copy it in your project

You can just copy RadioButton.js in your project and use it directly (react-native-animatable is required to make it work this way).

Usage

Not much to say here, the component itself is just presentational: you must handle the logic outside of it:

<RadioButton
  animation={'bounceIn'}
  isSelected={true}
  onPress={() => doSomething('hello')}
/>

Available props

PropDescriptionDefault
sizeSize of the Radio Button.16
innerColorColor of the inner circle.dodgerblue
outerColorColor of the outer circle.dodgerblue
isSelectedIs this Radio Button selected?false
onPressFunction invoked on button press.None

The Radio Button is animated by the awesome react-native-animatable.
To enable the animation you can just pass it any react-native-animatable props (e.g. animation, duration, etc...).
Hint: animation={'bounceIn'} is the animation that you can see in the preview gif above.

Stateless component info

As you can see by taking a look at RadioButton.js the component is plain simple and you can modify it easily.
If you're interested there's also a version of it written in a more function style here.

Keywords

FAQs

Last updated on 29 Sep 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc