RadioGroup
A headless RadioGroup component for ReactLynx. It manages single-selection state across a group of radio buttons.
Basic Usage
Disabled
RadioGroup supports disabling the entire group or individual options.
Structure
API
RadioGroupRoot
The root component of the RadioGroup, containing all of its child components.
defaultValueiOSAndroidHarmony
If the Radio is initially selected with certain value. Use this property means the RadioGroup is uncontrolled. If the value matches none of the Radio's value, the RadioGroup will be unselected.
disablediOSAndroidHarmony
If set to true, the RadioGroup can not accept interactions.
onValueChangeiOSAndroidHarmony
Send when selected value changed
valueiOSAndroidHarmony
Control the selected value of the RadioGroup. Use this property means the RadioGroup is controlled. If the value matches none of the Radio's value, the RadioGroup will be unselected.
childreniOSAndroidHarmony
children
State-based styling & rendering
This component exposes each of its internal states through two interchangeable channels, and the table below maps them one-to-one:
- CSS className — a class like
ui-<state>is toggled on the root node, so you can style it with selectors such as.ui-<state> { ... }. - Render-prop field — when
childrenis a function, the same state is passed in viachildren({ <state>: boolean, ... })for runtime-driven rendering.
ui-value
The current selected value of the RadioGroup.
Applied when `status.value` is not `null`.
ui-disabled
Whether the RadioGroup is disabled.
Applied when `status.disabled` is true.
Radio
The item inside RadioGroup.
childreniOSAndroidHarmony
children
classNameiOSAndroidHarmony
className
disablediOSAndroidHarmony
Disable this Radio. If set to true, this single Radio can not accept interactions.
radioPropsiOSAndroid
Radio supports original view props to be directly spread in this prop.
styleiOSAndroidHarmony
style
valueiOSAndroidHarmony
The identifier of this Radio
RadioIndicator
The check slot indicating this Radio is now selected. Normally a circle. It's children will only be rendered when selected so it can be a custom inner selected indicator. Can be a ReactNode or a render function returns a ReactNode.
childreniOSAndroidHarmony
children.
classNameiOSAndroidHarmony
className
forceMountiOSAndroid
Force mount the children. If set to true, the children will always be mounted even when checked is false.
styleiOSAndroidHarmony
style