RadioButton
A Radio Button component, should be wrapped with a RadioGroup
(code example)
Usageβ
function Example(props) { const [value, setValue] = useState(false); return ( <div> <RadioButton label={'Individual Radio Button'} selected={value} onPress={() => setValue(!value)}/> </div> ); }
APIβ
borderRadiusβ
The radio button border radius
number
colorβ
The color of the radio button
string
containerStyleβ
Additional styling for the container
ViewStyle
contentOnLeftβ
Should the content be rendered left to the button
boolean
disabledβ
Whether the radio button should be disabled
boolean
iconOnRightβ
Should the icon be on the right side of the label
boolean
iconSourceβ
Icon image source
ImageSource
iconStyleβ
Icon image style
ImageStyle
labelβ
A label for the radio button description
string
labelStyleβ
Label style
TextStyle
onPressβ
Invoked when pressing the button
(selected: boolean) => void
selectedβ
When using RadioButton without a RadioGroup, use this prop to toggle selection
boolean
sizeβ
The size of the radio button, affect both width & height
number
valueβ
The identifier value of the radio button. must be different than other RadioButtons in the same group
string | number | boolean