radio-button-react-native
Simple Radio Button component for React Native
Demo
Installation
in Cli
npm i radio-button-react-native --save
Getting started
; { superprops thisstate = value: 0 } { this} { return <View> <RadioButton currentValue=thisstatevalue value=0 onPress=thishandleOnPress> <Text>Button1</Text> </RadioButton> <RadioButton currentValue=thisstatevalue value=1 onPress=thishandleOnPress> <Text>Button2</Text> </RadioButton> <RadioButton currentValue=thisstatevalue value=2 onPress=thishandleOnPress> <Text>Button3</Text> </RadioButton> </View> ;}
Basic
<RadioFormcurrentValue=thisstatevalue value=0 onPress=thishandleOnPress outerCircleColor:'gray' outerCircleSize:24 outerCircleWidth:2 innerCircleColor:'red' innerCircleSize:12/>
assign a unique value to each radio button in 'value'
Props
RadioButton Component
outerCircleSize[Default:{24}]
give the size of outer Circle of Button.
outerCircleWidth[Default:{2}]
give the width of outer Circle of Button.
outerCircleColor[Default:'#9eacb4']
give the color of outer Circle of Button.
innerCircleSize[Default:{12}]
give the size of inner Circle of Button
innerCircleColor[Default:'#ff6624']
give the color of inner Circle.