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
Some parts of your documentation might become clear by organzing them in tabs, such as language-specific code snippets (e.g., tabs for Python, JavaScript, etc.) or an example that uses several files (e.g. a tabs for HTML, CSS, and JavaScript of a component)
7
+
8
+
A tab is defined using the `///` syntax and the name `tab`. Tabs should also specify the tab title in the
9
+
header. Consecutive tabs will automatically be grouped.
10
+
11
+
/// example | Tabs
12
+
13
+
```md
14
+
/// tab | Tab 1 title
15
+
Tab 1 content
16
+
///
17
+
18
+
/// tab | Tab 2 title
19
+
Tab 2 content
20
+
///
21
+
```
22
+
23
+
//// tab | Tab 1 title
24
+
Tab 1 content
25
+
////
26
+
27
+
//// tab | Tab 2 title
28
+
Tab 2 content
29
+
////
30
+
///
31
+
32
+
If you want to have two tab containers right after each other, you specify a hard break that will force the specified tab to start a brand new tab container.
33
+
34
+
/// example | New Tab Group
35
+
36
+
```md
37
+
/// tab | Tab A title
38
+
Tab A content
39
+
///
40
+
41
+
/// tab | Tab B title
42
+
Tab B content
43
+
///
44
+
45
+
/// tab | Tab C Title
46
+
new: true
47
+
48
+
Will be part of a separate, new tab group.
49
+
///
50
+
```
51
+
52
+
//// tab | Tab A title
53
+
Tab A content
54
+
////
55
+
56
+
//// tab | Tab B title
57
+
Tab B content
58
+
////
59
+
60
+
//// tab | Tab C title
61
+
new: true
62
+
Will be part of a separate, new tab group.
63
+
////
64
+
///
65
+
66
+
If desired, you can specify a tab to be selected by default with the `select` option.
67
+
68
+
```md
69
+
/// tab | Tab 1 title
70
+
Tab 1 content
71
+
///
72
+
73
+
/// tab | Tab 2 title
74
+
select: True
75
+
76
+
Tab 2 should be selected by default.
77
+
///
78
+
```
79
+
80
+
As with other blocks, you can always add new classes, and id or other attributes via the `attrs` option.
0 commit comments