Skip to main content

Radio

Usage

Enable Awesome Feature
function RadioUsage() {
const [isOn, setIsOn] = useState(false)

return (
<View>
<Radio
label="Enable Awesome Feature"
value={isOn}
onValueChange={setIsOn}
/>
</View>
)
}

Status

primary
accent
success
info
warning
error
function RadioStatuses() {
return (
<View style={{justifyContent: 'space-evenly'}}>
<Radio
status="primary"
label="primary"
containerStyle={styles.container}
/>
<Radio status="accent" label="accent" containerStyle={styles.container} />
<Radio
status="success"
label="success"
containerStyle={styles.container}
/>
<Radio status="info" label="info" containerStyle={styles.container} />
<Radio
status="warning"
label="warning"
containerStyle={styles.container}
/>
<Radio status="error" label="error" containerStyle={styles.container} />
</View>
)
}

Size

small
medium
large
function RadioSizes() {
return (
<View row style={{justifyContent: 'space-evenly'}}>
<Radio label="small" size="small" />
<Radio label="medium" size="medium" />
<Radio label="large" size="large" />
</View>
)
}

Disabled

small
medium
large
function RadioSizes() {
return (
<View row style={{justifyContent: 'space-evenly'}}>
<Radio label="small" size="small" />
<Radio label="medium" size="medium" />
<Radio label="large" size="large" />
</View>
)
}

Custom

Agree to T&C
Click here to see Privacy Policy
Please Agree to T&C to continue
Centered color Radio

Props

PropData TypeDefault ValueDescription
ExtendsSwitchProps$1--Inherits properties from SwitchProps$1
position"left" | "right"rightControl the position of the field
adjacentbooleantrueSet it to false to position them apart i.e. space-between
colorstring--Set custom color
labelstring--Label text above the input
captionstring--Caption text below the text input
errorstring--Error text in error `status` below caption text
containerStyleStyleProp<ViewStyle>--Container view style
labelStyleStyleProp<TextStyle>--Label text style
captionStyleStyleProp<TextStyle>--Caption text style
errorStyleStyleProp<TextStyle>--Error text style
statusBlossomStatusprimary--
sizeBlossomSizemedium--