Skip to content

Commit 91af41e

Browse files
authored
Merge branch '6.0' into chapter-zodb-v2
2 parents 2297ecb + 1aa1bd2 commit 91af41e

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

docs/contributing/documentation/myst-reference.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,63 @@ print(f"my {a}nd line")
350350
```
351351
````
352352

353+
### Tabs
354+
355+
You can use [Sphinx Design](https://sphinx-design.readthedocs.io/en/latest/) to provide code examples or commands for multiple operating systems or software versions in a tabbed interface.
356+
357+
The following snippet is an example of a tab component without synchronization, using a basic tab-set, and will display as shown.
358+
359+
`````{example}
360+
````{tab-set}
361+
362+
```{tab-item} Label1
363+
Content 1
364+
```
365+
366+
```{tab-item} Label2
367+
Content 2
368+
```
369+
370+
````
371+
`````
372+
373+
The following snippet is an example of a tab component with synchronization, where tab selection is linked across multiple tab-sets using a unique sync key, and will display as shown.
374+
375+
`````{example}
376+
````{tab-set}
377+
:sync-group: category
378+
379+
```{tab-item} Label1
380+
:sync: key1
381+
382+
Content 1
383+
```
384+
385+
```{tab-item} Label2
386+
:sync: key2
387+
388+
Content 2
389+
```
390+
391+
````
392+
393+
````{tab-set}
394+
:sync-group: category
395+
396+
```{tab-item} Label1
397+
:sync: key1
398+
399+
Content 1
400+
```
401+
402+
```{tab-item} Label2
403+
:sync: key2
404+
405+
Content 2
406+
```
407+
408+
````
409+
`````
353410

354411
### Escape literal backticks inline
355412

0 commit comments

Comments
 (0)