Skip to content

Illuminate Documentation

Illuminate

Home

Tabs

Learn how to use the Tabs component in your documentation to group similar content.


This is the content for the first tab.


Overview

Tabs can be used to group similar content in your documents, typically when the content in only one of the tabs is relevant to the reader. For example, tabs could be used to show instructions to perform the same task in different operating systems. Any kind of content can be placed within a Tab component, such as images, tables, code blocks, and other components.


Properties

Tabs

NameTypeDescription
defaultIndexnumberInitial index of the selected tab. 0 is the first Tab.

Tab

NameTypeDescription
title requiredstringTitle of the tab.

Examples

Tabs with text content

This is the content for the first tab.


<Tabs>
<Tab title="First Tab">
This is the content for the first tab.
</Tab>
<Tab title="Second Tab">
This is the content for the second tab.
</Tab>
</Tabs>

Tabs with other content types

Sample image alt text

Tabs with default index specified

This tab is index 1. This is the specified defaultIndex.


<Tabs defaultIndex={1} >
<Tab title="Index 0">
This tab is index 0.
</Tab>
<Tab title="Index 1">
This tab is index 1. This is the specified `defaultIndex`.
</Tab>
<Tab title="Index 2">
This tab is index 2.
</Tab>
</Tabs>

Keyboard support

KeyAction
ArrowLeftMoves focus to the next tab
ArrowRightMoves focus to the previous tab
TabWhen focus moves into the tab list, places focus on the active tab element
Space or EnterActivates the tab if it was not activated automatically on focus
HomeMoves focus to the first tab
EndMoves focus to the last tab

Built with by