Tabs

A component for toggling between related panels on the same page.

API reference

Import the component and place its parts the following way:

Anatomy
import { Tabs } from '@base-ui-components/react/tabs';

<Tabs.Root>
  <Tabs.List>
    <Tabs.Tab />
    <Tabs.Indicator />
  </Tabs.List>
  <Tabs.Panel />
</Tabs.Root>

Root

PropTypeDefault
classNamestring | (state) => stringundefined
defaultValueany0
onValueChange(value, event) => voidundefined
orientation'horizontal' | 'vertical''horizontal'
render| React.ReactElement
| (props, state) => React.ReactElement
undefined
valueanyundefined

List

PropTypeDefault
activateOnFocusbooleantrue
classNamestring | (state) => stringundefined
loopbooleantrue
render| React.ReactElement
| (props, state) => React.ReactElement
undefined

Tab

PropTypeDefault
classNamestring | (state) => stringundefined
render| React.ReactElement
| (props, state) => React.ReactElement
undefined
valueanyundefined