Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 28 additions & 13 deletions components/tabs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ icon: "panel-top"
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.
<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) {
Expand All @@ -18,18 +19,22 @@ Use tabs to organize content into multiple panels that users can switch between.
}
```
</Tab>
<Tab title="Second Tab">
✌️ Here's content that's only inside the second 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 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.
<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) {
Expand All @@ -38,11 +43,13 @@ Use tabs to organize content into multiple panels that users can switch between.
}
```
</Tab>
<Tab title="Second Tab">
✌️ Here's content that's only inside the second 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 title="Third tab">
💪 Here's content that's only inside the third tab.
</Tab>
</Tabs>
````
Expand All @@ -52,3 +59,11 @@ Use tabs to organize content into multiple panels that users can switch between.
<ResponseField name="title" type="string" required>
The title of the tab. Short titles are easier to navigate.
</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>
3 changes: 3 additions & 0 deletions navigation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ documentation.
"tabs": [
{
"tab": "API References",
"icon": "square-terminal",
"pages": [
"api-reference/get",
"api-reference/post",
Expand All @@ -123,6 +124,7 @@ documentation.
},
{
"tab": "SDKs",
"icon": "code",
"pages": [
"sdk/fetch",
"sdk/create",
Expand All @@ -131,6 +133,7 @@ documentation.
},
{
"tab": "Blog",
"icon": "newspaper",
"href": "https://external-link.com/blog"
}
]
Expand Down