Radio

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
Reference
Props for Radio.Group
style
Allow you to customize style
defaultValue
Default value to speficy which radio button is selected initially
onValueChange
(value: any) => void
A callback will be triggered when selected value changes
Props for Radio.Button
style
Allow you to customize style
value
According to value for comparison, to determine whether the selected
title
Title of radio button
titleStyle
Allows you to customize title's style
iconSize
Size of icon (or width and height for image, if you specify checkedImage/unCheckedImage)
disabled
Determines whether radio button is available
checked
Flag for checking the icon
checkedIconType
Checked icon (Icon Preset)
checkedIconColor
Color of checked icon
checkedImage
If you are not satisfied with icon preset, you can specify an image for checked icon
unCheckedIconType
UnChecked icon (Icon Preset)
unCheckedIconColor
Color of unChecked icon
unCheckedImage
If you are not satisfied with icon preset, you can specify an image for unChecked icon
animationType
Determines which animation is adpoted when checked value changes
- none: no animation
- opacity: fade in/out
- size: zoom in/out
enum('none', 'opacity', 'size') | no | 'size' |
onPress
() => void
A callback will be triggered when radio button is pressed