Socket
Socket
Sign inDemoInstall

react-native-animated-radio-button

Package Overview
Dependencies
1
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-animated-radio-button

Fully customizable animated radio button for React Native


Version published
Weekly downloads
193
increased by1.58%
Maintainers
1
Install size
57.5 kB
Created
Weekly downloads
 

Readme

Source
React Native Animated Radio Button

Battle Tested ✅

Fully customizable animated radio button for React Native

npm version npm Platform - Android and iOS License: MIT styled with prettier

React Native Animated Radio Button

Version 2 is here 😍

Finally, version 2 is here with much basic usage and re-written code. It does not support a text but it is easy to add a text depends on the dev Typescript support and much cleaner code

Installation

Add the dependency:

npm i react-native-animated-radio-button

Peer Dependencies

IMPORTANT! You need install them
"@freakycoder/react-native-bounceable": ">= 0.2.5",

Usage

Import

import RadioButton from "react-native-animated-radio-button";

Basic Usage

You can check the example out 😏

<RadioButton
  onPress={(isActive: boolean) =>
    console.log("RadioButton isActive: ", isActive)
  }
/>

Customization Usage

<RadioButton
  style={{
    marginTop: 32,
    borderRadius: 16,
    borderWidth: 3,
    borderColor: "#328da8",
  }}
  innerBackgroundColor="#328da8"
  innerContainerStyle={{ height: 35, width: 35, borderRadius: 10 }}
  onPress={(isActive: boolean) => console.log("isActive: ", isActive)}
/>

Configuration - Props

PropertyTypeDefaultDescription
stylestyledefaultset the main container's style (outer circle)
innerContainerStylestyledefaultset the inner container's style (inner circle)
innerBackgroundColorcolorredchange the inner circle's background color
initialbooleanundefinedset the initial activation of the radio button
isActivebooleanundefinedthis will disable the built-in state of activation
onPressfunctiondefaultset your own function when onPress is triggered

Future Plans

  • LICENSE
  • Horizontal & Vertical text component as optional
  • Typescript Challenge!
  • Write an article about the lib on Medium

Author

FreakyCoder, kurayogun@gmail.com

License

React Native Animated Radio Button is available under the MIT license. See the LICENSE file for more info.

Keywords

FAQs

Last updated on 22 May 2021

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