Deprecation Notice
RadioGroup is deprecated and will be removed in a future version.
Use ControlGroup with role="radiogroup"
instead for better accessibility, consistency, and maintainability.
RadioGroup onChange fails without a string type declaration for setGroup fns.
Migration Guide
✅ Recommended: Using ControlGroup
The new recommended approach provides better accessibility, cleaner API, and consistent behavior across the design system.
Migration Steps
-
Replace RadioGroup with ControlGroup:
-
Update options format:
-
Update onChange handler:
-
Add proper role:
Legacy Usage (Deprecated)
The following examples show the deprecated RadioGroup usage. Do not use this in new code. Use ControlGroup instead.
Basic RadioGroup (Legacy)
With Custom Label (Legacy)
Color Customization (Legacy)
Like other control components (i.e. Checkbox, Switch), you can customize the color of the Radio by setting the controlColor
prop.
For more advanced color customization, you can use additional style props on individual Radio components like background
, borderColor
, and color
: