You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/tabs.mdx
+28-13Lines changed: 28 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,9 +7,10 @@ icon: "panel-top"
7
7
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.
8
8
9
9
<Tabs>
10
-
<Tabtitle="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
+
<Tabtitle="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:
13
14
```java HelloWorld.java
14
15
class HelloWorld {
15
16
publicstaticvoidmain(String[] args) {
@@ -18,18 +19,22 @@ Use tabs to organize content into multiple panels that users can switch between.
18
19
}
19
20
```
20
21
</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!
23
26
</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.
26
29
</Tab>
27
30
</Tabs>
28
31
29
32
````mdx Tabs example
30
33
<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:
33
38
```java HelloWorld.java
34
39
class HelloWorld {
35
40
public static void main(String[] args) {
@@ -38,11 +43,13 @@ Use tabs to organize content into multiple panels that users can switch between.
38
43
}
39
44
```
40
45
</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!
43
50
</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.
46
53
</Tab>
47
54
</Tabs>
48
55
````
@@ -52,3 +59,11 @@ Use tabs to organize content into multiple panels that users can switch between.
0 commit comments