Skip to content

Commit 50cfa01

Browse files
committed
add icon info to tabs page
1 parent 3a37747 commit 50cfa01

File tree

1 file changed

+28
-13
lines changed

1 file changed

+28
-13
lines changed

components/tabs.mdx

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ icon: "panel-top"
77
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.
88

99
<Tabs>
10-
<Tab title="First Tab">
11-
☝️ Welcome to the content that you can only see inside the first Tab.
12-
You can add any number of components inside of tabs.
10+
<Tab title="First tab">
11+
☝️ Welcome to the content that you can only see inside the first tab.
12+
13+
You can add any number of components inside of tabs. For example, a code block:
1314
```java HelloWorld.java
1415
class HelloWorld {
1516
public static void main(String[] args) {
@@ -18,18 +19,22 @@ Use tabs to organize content into multiple panels that users can switch between.
1819
}
1920
```
2021
</Tab>
21-
<Tab title="Second Tab">
22-
✌️ Here's content that's only inside the second Tab.
22+
<Tab title="Second tab" icon="leaf">
23+
✌️ Here's content that's only inside the second tab.
24+
25+
This one has a <Icon icon="leaf" /> icon!
2326
</Tab>
24-
<Tab title="Third Tab">
25-
💪 Here's content that's only inside the third Tab.
27+
<Tab title="Third tab">
28+
💪 Here's content that's only inside the third tab.
2629
</Tab>
2730
</Tabs>
2831
2932
````mdx Tabs example
3033
<Tabs>
31-
<Tab title="First Tab">
32-
☝️ Welcome to the content that you can only see inside the first Tab.
34+
<Tab title="First tab">
35+
☝️ Welcome to the content that you can only see inside the first tab.
36+
37+
You can add any number of components inside of tabs. For example, a code block:
3338
```java HelloWorld.java
3439
class HelloWorld {
3540
public static void main(String[] args) {
@@ -38,11 +43,13 @@ Use tabs to organize content into multiple panels that users can switch between.
3843
}
3944
```
4045
</Tab>
41-
<Tab title="Second Tab">
42-
✌️ Here's content that's only inside the second Tab.
46+
<Tab title="Second tab" icon="leaf">
47+
✌️ Here's content that's only inside the second tab.
48+
49+
This one has a <Icon icon="leaf" /> icon!
4350
</Tab>
44-
<Tab title="Third Tab">
45-
💪 Here's content that's only inside the third Tab.
51+
<Tab title="Third tab">
52+
💪 Here's content that's only inside the third tab.
4653
</Tab>
4754
</Tabs>
4855
````
@@ -52,3 +59,11 @@ Use tabs to organize content into multiple panels that users can switch between.
5259
<ResponseField name="title" type="string" required>
5360
The title of the tab. Short titles are easier to navigate.
5461
</ResponseField>
62+
63+
<ResponseField name="icon" type="string or svg">
64+
A [Font Awesome](https://fontawesome.com/icons) icon, [Lucide](https://lucide.dev/icons) icon, URL to an icon, relative path to an icon, or SVG code.
65+
</ResponseField>
66+
67+
<ResponseField name="iconType" type="string">
68+
For Font Awesome icons only: One of `regular`, `solid`, `light`, `thin`, `sharp-solid`, `duotone`, `brands`.
69+
</ResponseField>

0 commit comments

Comments
 (0)