Skip to content

useTabs API

API reference docs for the useTabs hook. Learn about the input parameters and other APIs of this exported module.

Demos

For examples and details on the usage of this React hook, visit the demo pages:

Import

import useTabs from '@mui/base/useTabs';

Parameters

NameTypeDefaultDescription
defaultValuestring | number | false
The default value. Use when the component is not controlled.
direction'ltr' | 'rtl''ltr'
The direction of the text.
onChange(event: React.SyntheticEvent, value: number | string | boolean) => void
Callback invoked when new value is being set.
orientation'horizontal' | 'vertical''horizontal'
The component orientation (layout flow direction).
selectionFollowsFocusboolean
If true the selected tab changes on focus. Otherwise it only changes on activation.
valuestring | number | false
The value of the currently selected Tab. If you don't want any selected Tab, you can set this prop to false.

Return value

NameTypeDefaultDescription