SegmentedSwitch API
Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.
SegmentedSwitch14 props1 callbacks0 methods
Props14
| Name | Type | Description |
|---|---|---|
valueRequired |
| Value to display or edit. The declared type identifies the supported representation; change callbacks describe how edited values are emitted. |
optionsRequired |
| Available choices or control configuration, according to the declared type; expand it to inspect each field. |
ariaLabelOptional | string | undefined | Accessible name announced by assistive technology. |
classNameOptional | string | undefined | Additional CSS classes applied to the component root. |
itemClassNameOptional | string | undefined | Additional CSS classes for the item part of the component. |
countClassNameOptional | string | undefined | Additional CSS classes for the count part of the component. |
activeClassNameOptional | string | undefined | Additional CSS classes for the active part of the component. |
disabledOptional | boolean | undefined | Disables user interaction with the control. |
iconOnlyOptional | boolean | undefined | Compact icon layout. Supply icons through renderOption and text through option labels. |
titleOptional | string | undefined | Heading or title text used by this component. |
roleOptional |
| Accessibility role used by the rendered element. |
testIdOptional | string | undefined | Stable data attribute for locating the control in automated tests. |
renderOptionOptional |
| Custom renderer for an option and its current selection/disabled state. |
renderCountOptional |
| Custom renderer for the count shown beside a segmented option. |
Events and callbacks1
| Name | Type | Description |
|---|---|---|
onChangeRequired |
| Receives the new value when the user changes the control. Update the corresponding value prop for controlled use. |
Methods0
No component-specific imperative methods. Use props and callbacks to control this component.