Skip to main content

Tabs

Tabbed interface for organizing content into separate panels

Example

tabs
Loading preview…

Tabs

Tabbed interface for organizing content into separate panels

Source: packages/appkit-ui/src/react/ui/tabs.tsx

Props

PropTypeRequiredDefaultDescription
valuestring-The value for the selected tab, if controlled
defaultValuestring-The value of the tab to select by default, if uncontrolled
onValueChange((value: string) => void)-A function called when a new tab is selected
orientationenum-The orientation the tabs are layed out. Mainly so arrow navigation is done accordingly (left & right vs. up & down) @defaultValue horizontal
direnum-The direction of navigation between toolbar items.
activationModeenum-Whether a tab is activated automatically or manually. @defaultValue automatic
asChildboolean--

Usage

import { Tabs } from '@databricks/appkit-ui';

<Tabs /* props */ />

TabsContent

Content panel associated with a tab

Source: packages/appkit-ui/src/react/ui/tabs.tsx

Props

PropTypeRequiredDefaultDescription
valuestring-The value for the selected tab, if controlled
forceMounttrue-Used to force mounting when more control is needed. Useful when controlling animation with React animation libraries.
asChildboolean--

Usage

import { TabsContent } from '@databricks/appkit-ui';

<TabsContent /* props */ />

TabsList

Container for tab trigger buttons

Source: packages/appkit-ui/src/react/ui/tabs.tsx

Props

PropTypeRequiredDefaultDescription
loopboolean--
asChildboolean--

Usage

import { TabsList } from '@databricks/appkit-ui';

<TabsList /* props */ />

TabsTrigger

Button that activates a tab panel

Source: packages/appkit-ui/src/react/ui/tabs.tsx

Props

PropTypeRequiredDefaultDescription
valuestring-The value for the selected tab, if controlled
asChildboolean--

Usage

import { TabsTrigger } from '@databricks/appkit-ui';

<TabsTrigger /* props */ />