🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@rn-components-kit/radio

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rn-components-kit/radio

Radio buttons allow users to select one option from a set.

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Radio

NPM version

English | 中文

Radio buttons allow users to select one option from a set. It supports following features:

  • disable click
  • customized checked/unChecked icon
  • three animation types

How to use

npm install @rn-components-kit/radio --save
PreviewCode
Demo1 Code
Demo2 Code
Demo3 Code
Demo4 Code

Reference

Props for Radio.Group

style

Allow you to customize style

TypeRequiredDefault
objectno-

defaultValue

Default value to speficy which radio button is selected initially

TypeRequiredDefault
anyno-

onValueChange

(value: any) => void
TypeRequiredDefault
functionno() => {}

A callback will be triggered when selected value changes

Props for Radio.Button

style

Allow you to customize style

TypeRequiredDefault
objectno-

value

According to value for comparison, to determine whether the selected

TypeRequiredDefault
anyyes-

title

Title of radio button

TypeRequiredDefault
stringyes-

titleStyle

Allows you to customize title's style

TypeRequiredDefault
objectno-

iconSize

Size of icon (or width and height for image, if you specify checkedImage/unCheckedImage)

TypeRequiredDefault
numberno20

disabled

Determines whether radio button is available

TypeRequiredDefault
booleannofalse

checked

Flag for checking the icon

TypeRequiredDefault
booleannofalse

checkedIconType

Checked icon (Icon Preset)

TypeRequiredDefault
stringno'check-radio'

checkedIconColor

Color of checked icon

TypeRequiredDefault
stringno'#1890FF'

checkedImage

If you are not satisfied with icon preset, you can specify an image for checked icon

TypeRequiredDefault
stringno-

unCheckedIconType

UnChecked icon (Icon Preset)

TypeRequiredDefault
stringno'circle'

unCheckedIconColor

Color of unChecked icon

TypeRequiredDefault
stringno'#BFBFBF'

unCheckedImage

If you are not satisfied with icon preset, you can specify an image for unChecked icon

TypeRequiredDefault
stringno-

animationType

Determines which animation is adpoted when checked value changes

  • none: no animation
  • opacity: fade in/out
  • size: zoom in/out
TypeRequiredDefault
enum('none', 'opacity', 'size')no'size'

onPress

() => void

A callback will be triggered when radio button is pressed

TypeRequiredDefault
functionno() => {}

Keywords

react-native

FAQs

Package last updated on 11 Jun 2019

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