Tabs
2 min
tabs docid 4lk3iqud5wfhh7fltkxof organize related content into switchable panels they are useful for presenting examples in multiple programming languages, frameworks, operating systems, or alternative workflows without increasing page length syntax you can add this component using either markdown or mdx \ tabs \ tab{title="tab name"} content here \ \ \<tabs> \<tab title="tab name"> content here \</tab> \</tabs> each tab element requires a title property, which is displayed as the tab label you can place any supported markdown or mdx content inside a tab, including text, images, tables, code blocks, and other components mdx example the following example creates three tabs containing equivalent code samples in different programming languages \<tabs> \<tab title="javascript"> ```javascript const greeting = 'hello, world!' console log(greeting) ``` \</tab> \<tab title="python"> ```python greeting = "hello, world!" print(greeting) ``` \</tab> \<tab title="go"> ```go package main import "fmt" func main() { fmt println("hello, world!") } ``` \</tab> \</tabs>
Have a question?
Our super-smart AI, knowledgeable support team and an awesome community will get you an answer in a flash.
To ask a question or participate in discussions, you'll need to authenticate first.