Components/Form
Interactive docs page: https://wix-pages.com/design-system-documentation/#/component/radiogroup
Radio groups (radio buttons) allow users to choose a single item from a list of options.
<Checkbox/> component instead.<Dropdown/> or <Autocomplete/> components instead.The component consists of a list of options with radio buttons wrapped inside <RadioGroup>.
Option labels are plain text by default, but they can be replaced with any other component or set of components.
Adjust the component size using the size prop. It supports 2 sizes:
medium (default) - use in all common cases
small - use in more dense layouts
Control the layout of the options with the display prop. Choose from 2 layouts:
vertical.horizontal for options with short labels (e.g., Yes/No selections in a form), or when there is limited space.Control the pixel spacing between options with the spacing prop.
Control how the radio buttons align to the text with the vAlign prop. Choose from 2 alignments:
center (the default) aligns the radio button to the middle of the text. It is recommended for most common cases.top aligns the radio buttons to the top of the text. This is good for options that go over 3 or more lines of text.Radio options can be disabled in 2 ways:
disabled.disabledRadios.Add text that explains the status or what action the user should take with the statusMessage prop.
Show the status message inline, directly below the radio group by wrapping it in a <FormField/> and adding statusMessage.
View more inline status message examples in <FormField/>.
Highlight the clickable area of an option by controlling the design. It's recommended to always use this on mobile.
selectionArea.selectionAreaSkin.selectionAreaPadding.Use the content prop to show additional details for an option. It accepts any kind of content and places it outside of a radio option.
Only use small size radio buttons in settings panels to ensure consistency across all panels.
Have a default option selected whenever possible, ideally a neutral choice such as "None" or "All".
Use <InfoIcon/> to add a tooltip next to an option to provide additional information.
Use a horizontal layout when displaying radio lists with 2-3 options and short descriptions. This layout is great for situations where vertical space is limited.
Other components can also be used in radio option labels (e.g., avatar, illustration, additional text).
| Name | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Lists RadioGroup items. You're recommended to use it with <RadioGroup.Radio/>. |
dataHook | string | — | Applies a data-hook HTML attribute that can be used in the tests. |
disabled | boolean | — | Disables the entire group. |
disabledRadios | (string | number | undefined)[] | — | Specify the values of the disabled radio buttons. |
display | "horizontal" | "vertical" | 'vertical' | Control options direction. |
fullWidth | boolean | false | Makes component full width and divides all available horizontal space into even parts for each radio button. |
name | string | — | Sets a unique name of a radio group. |
onChange | (value: string | number | undefined) => void | — | Defines a callback function which is called every time user selects a different value. |
selectionArea | "none" | "hover" | "always" | 'none' | Controls selection area highlight visibility. |
selectionAreaPadding | string | number | string & {} | — | Sets the amount of white space around the radio label in pixels. |
selectionAreaSkin | "filled" | "outlined" | 'filled' | Sets the design of the selection area. |
size | "small" | "medium" | 'medium' | Controls size. |
spacing | string | — | Controls the distance between options. |
type | "button" | "default" | — | Controls whether the group renders standard radios or radio buttons. |
vAlign | "center" | "top" | 'center' | Controls radio alignment to the label on Y axis. |
value | string | number | '' | Specifies the selected radio value. |
Import the driver matching your test environment:
| Method | Description |
|---|---|
selectByValue | Selects the radio that matches the provided value |
selectByIndex | Selects the radio in the provided index |
getRadioValueAt | Get the radio value in the provided index |
getRadioAtIndex | Get the radio element in the provided index, returns an element merged with the RadioButton driver methods |
getSelectedValue | Get the value of the selected radio |
isRadioDisabled | Checks if the radio in the provided index is disabled |
getNumberOfRadios | Get the number of rendered radios |
getRadioIdAt | Get the value of radio button id at the provided index |
getRadioName | Get the value of radio button name at the provided index |
isRadioChecked | Checks if the radio with the provided index is checked |
exists | Checks whether the component found with the given data hook. |
element | Gets the component root element. |
click | Clicks on the component root element. |
base | Returns UniDriver for the base element. |
Last updated: 22 October 2026