Skip to content

Radio

Radio buttons allow users to select exactly one option from a set. Use when users need to see all options at once.


Unselected
<Radio
selected={false}
onSelect={() => setValue('option')}
accessibilityLabel="Option"
/>
Selected
<Radio
selected={true}
onSelect={() => setValue('option')}
accessibilityLabel="Option"
/>

sm
md
lg
SizeOuterInnerUsage
sm16px8pxCompact lists
md20px10pxDefault
lg24px12pxProminent choices

Disabled
Disabled selected
<Radio
selected={false}
disabled
onSelect={() => {}}
accessibilityLabel="Unavailable option"
/>

Use RadioGroup to manage selection state for multiple options.

Three Coins
Yarrow Stalks
Plum Blossom
import { RadioGroup, RadioGroupItem } from '@synchronicity/react-native';
function CastingMethodPicker() {
const [method, setMethod] = useState('three-coins');
return (
<RadioGroup value={method} onValueChange={setMethod}>
<View style={styles.option}>
<RadioGroupItem
value="three-coins"
accessibilityLabel="Three Coins method"
/>
<Text>Three Coins</Text>
</View>
<View style={styles.option}>
<RadioGroupItem
value="yarrow"
accessibilityLabel="Yarrow Stalks method"
/>
<Text>Yarrow Stalks</Text>
</View>
<View style={styles.option}>
<RadioGroupItem
value="plum"
accessibilityLabel="Plum Blossom method"
/>
<Text>Plum Blossom</Text>
</View>
</RadioGroup>
);
}

PropTypeDefaultDescription
selectedbooleanRequiredWhether selected
onSelect() => voidRequiredSelection handler
size'sm' | 'md' | 'lg''md'Radio size
disabledbooleanfalseDisable interaction
styleViewStyle-Custom styles
accessibilityLabelstringRequiredA11y label
PropTypeDescription
valuestringCurrently selected value
onValueChange(value: string) => voidChange handler
childrenReactNodeRadioGroupItem elements
styleViewStyleCustom styles
PropTypeDefaultDescription
valuestringRequiredOption value
size'sm' | 'md' | 'lg''md'Radio size
disabledbooleanfalseDisable this option
accessibilityLabelstringRequiredA11y label

import { RadioGroup, RadioGroupItem, Card, Text } from '@synchronicity/react-native';
import { View, StyleSheet } from 'react-native';
import { useState } from 'react';
function ThemeSelector() {
const [theme, setTheme] = useState('dark');
const themes = [
{ value: 'light', label: 'Light', description: 'Classic light appearance' },
{ value: 'dark', label: 'Dark', description: 'Easy on the eyes' },
{ value: 'oled', label: 'OLED', description: 'True black for OLED screens' },
{ value: 'system', label: 'System', description: 'Follow device setting' },
];
return (
<Card>
<Text style={styles.title}>Appearance</Text>
<RadioGroup value={theme} onValueChange={setTheme}>
{themes.map(option => (
<View key={option.value} style={styles.option}>
<RadioGroupItem
value={option.value}
accessibilityLabel={option.label}
/>
<View style={styles.optionText}>
<Text style={styles.optionLabel}>{option.label}</Text>
<Text style={styles.optionDesc}>{option.description}</Text>
</View>
</View>
))}
</RadioGroup>
</Card>
);
}
const styles = StyleSheet.create({
title: {
fontSize: 18,
fontWeight: '600',
marginBottom: 16,
},
option: {
flexDirection: 'row',
alignItems: 'flex-start',
gap: 12,
paddingVertical: 12,
},
optionText: {
flex: 1,
},
optionLabel: {
fontSize: 16,
fontWeight: '500',
},
optionDesc: {
fontSize: 14,
color: '#8a8a9a',
marginTop: 2,
},
});