Learn about the ToggleGroup component for use in UI extensions.
ToggleGroup
component renders a list of selectable options, either in radio button or checkbox form.
Prop | Type | Description |
---|---|---|
name | String | The input’s unique identifier. |
label | String | The text that displays above the toggles. |
options | Array | An array of options to display in the group. Each object in the array contains:
|
toggleType | 'radioButtonList' | 'checkboxList' (default) | The type of toggle, whether checkboxes or radio buttons. Radio buttons only allow one option to be selected. |
variant | 'default' (default) | 'small' | The size of the toggle. |
error | Boolean | When set to true, validationMessage is displayed as an error message if provided. The input will also render its error state to let the user know there is an error. If left false , validationMessage is displayed as a success message. |
value | String | The value of the toggle group.
|
required | Boolean | When set to true , displays a required indicator next to the toggle group. Default is false . |
tooltip | String | Text that will appear in a tooltip next to the toggle group label. |
validationMessage | String | The text to display if the input has an error. |
inline | Boolean | When set to true , stacks the options horizontally. Default is false . |
readonly | Boolean | When set to true , users will not be able to select the toggle. Default is false . |
onChange | (checked: boolean) => void | A function that is invoked when the toggle is clicked. |
toggleType
prop, you can set the options to display as checkboxes or radio buttons. You can also use the inline
prop to stack options horizontally.
![]() |
toggleType=‘checkboxList’ (default) |
![]() |
toggleType=‘radioButtonList’ |
![]() |
inline={true} |