---
title: "Tabs"
slug: tabs
category: component
type: documentation
version: 20.0.0
tokens: 1918
source: https://ovh.github.io/design-system/v20.0.0/llms/react-components-tabs--documentation.txt
---
# Tabs
_**Tabs** are a way of navigating between multiple panels, reducing clutter and fitting more into a smaller space_
## Overview
**Tabs** are used to organize content by grouping similar information on the same page.
| | |
|---|---|
| Name | Tabs |
| Also known as | Tab Navigation, Tabbed interface |
| Design | https://www.figma.com/design/9jDDTcR4a9jPRFcdjawAlf/ODS---UI-Kit?node-id=52-11168 |
| Source | https://github.com/ovh/design-system/tree/master/packages/ods-react/src/components/tabs |
## Usage
**Tabs** component is ideal for dashboards, settings pages, profile sections, and any interface where multiple views need to be accessible from the same page.
They can also be used to filter content via some common denominator.
### Dos & Don'ts
**Do**
- Use Tabs to group related content under the same page when it fits in a shared context
- Keep Tab labels short, clear, and scannable, use nouns or very short phrases (1–3 words max)
- Use Tabs for horizontal navigation, not hierarchical structure or progressive steps
- Do use default Tabs for main navigation
- Do use switch variant when Tabs act as a mode selector or view switcher (e.g., toggling between "List" and "Grid" views)
**Don't**
- Don't use Tabs as a progress indicator or wizard steps
- Don't nest Tabs inside other Tabs, this creates a confusing and hard-to-navigate experience
- Don't overload the interface with too many tabs. Use dropdowns if you need more than 5 tabs
- Don't use long or verbose labels
- Don't use external links or actions as tab triggers, Tabs should only control the visibility of in-page content
- Avoid using the switch variant for main navigation or complex page segmentation. Prefer the default Tabs for those cases instead
### Best Practices in Context
1. **Tabs**
2. **Scroll Buttons (previous/next) - optional**
3. **Active tab**
4. **Unselected tab**
## Placement
**Tabs** are often used in the top part of a web page, as it can act as a navigation focus.
## Behavior
By default, one of the **Tab** is always selected.
Each **Tab** can be hovered, focused and selected. A **Tab** can also act as a disabled **Tab**.
**Tabs** always stay on the same line, and can be horizontally scrolled through if they happen to not fit their container.
Each **Tab** has a panel displaying content. Selecting a **Tab** displays the corresponding panel.
The panel does not depend on the **Tab** component, it is in the developer's hands.
### Scroll Buttons
When the number of **Tabs** exceeds the visible container width, left and right scroll buttons can be displayed to allow horizontal navigation.
Clicking a button scrolls to the next or previous group of **Tabs** that were not visible.
When at the first tab, the left button is displayed but disabled.
When at the last tab, the right button is displayed but disabled.
Scroll buttons do not affect tab selection. They only change the visible portion of the **Tabs** list.
### Panel content rendering
By default, the content of every panel is rendered, and inactive panels are hidden. Use the `mountStrategy` prop on **Tabs** to choose when the content of inactive panels is rendered:
- `keep` (default): the content of every panel is always rendered, inactive panels are only hidden.
- `lazy`: the content of a panel is rendered the first time its **Tab** is selected, then kept like `keep`.
- `unmount`: the content of a panel is rendered only while its **Tab** is selected, and removed when another **Tab** is selected.
Each **TabContent** can set its own `mountStrategy`, which overrides the **Tabs** one for this panel only.
The panel element itself (with its `id`, `role="tabpanel"` and `aria-labelledby`) is always rendered, only its content depends on the strategy.
```tsx
Rendered on load, as it is the selected tab. Rendered the first time this tab is shown, then kept. Always rendered, so it stays in the server-rendered HTML and can be indexed.
Other libraries
ODS mountStrategy