Files
mintlify__docs/components/tabs.mdx
Ethan Palm 4cf3001658 Document tab and code group synchronization (#2740)
* Update components/tabs.mdx

Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>

* Update components/code-groups.mdx

Co-Authored-By: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>

* concision

* copyedits to tabs

---------

Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
2026-01-16 15:45:04 -08:00

76 lines
2.7 KiB
Plaintext

---
title: "Tabs"
description: "Organize content with tabs to show different options or versions."
keywords: ["tabbed content", "content panels", "switchable content"]
---
Use tabs to organize content into multiple panels that users can switch between. You can add any number of tabs and include other components inside each tab.
<Tabs>
<Tab title="First tab">
☝️ Welcome to the content that you can only see inside the first tab.
You can add any number of components inside of tabs. For example, a code block:
```java HelloWorld.java
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
```
</Tab>
<Tab title="Second tab" icon="leaf">
✌️ Here's content that's only inside the second tab.
This one has a <Icon icon="leaf" /> icon!
</Tab>
<Tab title="Third tab">
💪 Here's content that's only inside the third tab.
</Tab>
</Tabs>
````mdx Tabs example
<Tabs>
<Tab title="First tab">
☝️ Welcome to the content that you can only see inside the first tab.
You can add any number of components inside of tabs. For example, a code block:
```java HelloWorld.java
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}
```
</Tab>
<Tab title="Second tab" icon="leaf">
✌️ Here's content that's only inside the second tab.
This one has a <Icon icon="leaf" /> icon!
</Tab>
<Tab title="Third tab">
💪 Here's content that's only inside the third tab.
</Tab>
</Tabs>
````
Tabs automatically synchronize with other tabs and [code groups](/components/code-groups) on the same page when their labels match. When you select a tab, all other tabs and code groups with the same label update to match your selection.
## Properties
<ResponseField name="title" type="string" required>
The title of the tab. Short titles are easier to navigate. Tabs with matching titles synchronize their selections.
</ResponseField>
<ResponseField name="icon" type="string">
A [Font Awesome](https://fontawesome.com/icons) icon, [Lucide](https://lucide.dev/icons) icon, URL to an icon, or relative path to an icon.
</ResponseField>
<ResponseField name="iconType" type="string">
For Font Awesome icons only: One of `regular`, `solid`, `light`, `thin`, `sharp-solid`, `duotone`, `brands`.
</ResponseField>
<ResponseField name="borderBottom" type="boolean">
Adds a bottom border and padding to the tabs container. Useful to visually separate tabbed content from the rest of the page, especially when tabs contain content of varying lengths.
</ResponseField>