Skip to components
DEVELOPER REFERENCE · v4.0.0

Tabs API

Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.

Tabs14 props1 callbacks0 methods

Props14

Tabs props
NameTypeDescription
valueRequired
TInspect type
Value to display or edit. The declared type identifies the supported representation; change callbacks describe how edited values are emitted.
optionsRequired
SegmentedSwitchOption<T>[]Inspect type
Available choices or control configuration, according to the declared type; expand it to inspect each field.
ariaLabelOptionalstring | undefinedAccessible name announced by assistive technology.
classNameOptionalstring | undefinedAdditional CSS classes applied to the component root.
itemClassNameOptionalstring | undefinedAdditional CSS classes for the item part of the component.
countClassNameOptionalstring | undefinedAdditional CSS classes for the count part of the component.
activeClassNameOptionalstring | undefinedAdditional CSS classes for the active part of the component.
disabledOptionalboolean | undefinedDisables user interaction with the control.
iconOnlyOptionalboolean | undefinedCompact icon layout. Supply icons through renderOption and text through option labels.
titleOptionalstring | undefinedHeading or title text used by this component.
roleOptional
SegmentedSwitchRole | undefinedInspect type
Accessibility role used by the rendered element.
testIdOptionalstring | undefinedStable data attribute for locating the control in automated tests.
renderOptionOptional
((option: SegmentedSwitchOption<T>, state: { active: boolean; disabled: boolean; }) => SegmentedSwitchRenderable) | undefinedInspect type
Custom renderer for an option and its current selection/disabled state.
renderCountOptional
((option: SegmentedSwitchOption<T>, state: { active: boolean; disabled: boolean; }) => SegmentedSwitchRenderable) | undefinedInspect type
Custom renderer for the count shown beside a segmented option.

Events and callbacks1

Tabs events and callbacks
NameTypeDescription
onChangeRequired
(value: T, option: SegmentedSwitchOption<T>) => voidInspect type
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.