React Native · Components
RadioGroup
A single-choice option list (the same options API as RadioGroup on web).
3 exports
Import
RadioGroup
componentA single-choice option list (the same options API as RadioGroup on web). The circle is 16 px and the selected inner dot 8 px; the same on both platforms.
Examples
RadioOption
interfaceAn option of RadioGroup.
| Name | Type | Description |
|---|---|---|
value | V | Value. |
label | ReactNode | Display name. |
description? | ReactNode | Description below the name. |
disabled? | boolean | This option is disabled. |
RadioGroupProps
interfaceProps of RadioGroup.
Extends: FieldProps
| Name | Type | Default | Description |
|---|---|---|---|
ref? | Ref<ViewRef> | Ref of the underlying native element. | |
options | readonly RadioOption<V>[] | Options. | |
value? | V | null | Selected value (controlled). | |
defaultValue? | V | null | Initially selected value (uncontrolled). | |
onValueChange? | (value: V) => void | When the selection changes. | |
orientation? | "vertical" | "horizontal" | "vertical" | Layout direction. |
style? | StyleProp<ViewStyle> | Container style. |