Skip to main content

Tabs

Allow users to navigate between related blocks of content, showing one section at a time.

Tab content 1
<Tabs>
<TabsControl>
<Tab label="Tab 1" index={0} />
<Tab label="Tab 2" index={1} />
<Tab label="Tab 3" index={2} />
</TabsControl>
<TabsPanel index={0}>Tab content 1</TabsPanel>
<TabsPanel index={1}>Tab content 2</TabsPanel>
<TabsPanel index={2}>Tab content 3</TabsPanel>
</Tabs>

Props

Direction

Tab content 1
Tab content 1
<Tabs>
<TabsControl>
<Tab label="Tab 1" index={0} />
<Tab label="Tab 2" index={1} />
<Tab label="Tab 3" index={2} />
</TabsControl>
<TabsPanel index={0}>Tab content 1</TabsPanel>
<TabsPanel index={1}>Tab content 2</TabsPanel>
<TabsPanel index={2}>Tab content 3</TabsPanel>
</Tabs>

<Tabs direction="landscape">
<TabsControl>
<Tab label="Tab 1" index={0} />
<Tab label="Tab 2" index={1} />
<Tab label="Tab 3" index={2} />
</TabsControl>
<TabsPanel index={0}>Tab content 1</TabsPanel>
<TabsPanel index={1}>Tab content 2</TabsPanel>
<TabsPanel index={2}>Tab content 3</TabsPanel>
</Tabs>

Dense

Tab content 1
<Tabs dense>
<TabsControl>
<Tab label="Label" index={0} />
<Tab label="Label" index={1} />
<Tab label="Label" index={2} />
</TabsControl>
<TabsPanel index={0}></TabsPanel>
<TabsPanel index={1}></TabsPanel>
<TabsPanel index={2}></TabsPanel>
</Tabs>

Has border

Tab content 1
<Tabs hasBorder>
<TabsControl>
<Tab label="Label" index={0} />
<Tab label="Label" index={1} />
<Tab label="Label" index={2} />
</TabsControl>
<TabsPanel index={0}></TabsPanel>
<TabsPanel index={1}></TabsPanel>
<TabsPanel index={2}></TabsPanel>
</Tabs>