🚧 This documentation is a Work In Progress!
Skip to content

Tabs

Use the <Tabs /> and <TabItem /> components to create tabbed content blocks. This is ideal for showing code in multiple languages or providing alternative versions of the same information.

Basic Usage

jsx
<Tabs>
  <TabItem value="js" label="JavaScript">
    ```javascript console.log("Hello World"); ```
  </TabItem>
  <TabItem value="py" label="Python">
    ```python print("Hello World") ```
  </TabItem>
</Tabs>

Props

<Tabs />

PropTypeDescription
defaultValuestrThe value of the tab to show by default.
groupIdstrSync selection across multiple tab blocks with the same ID.

<TabItem />

PropTypeDescription
valuestr(Required) Unique identifier for the tab.
labelstrThe text displayed on the tab button.
defaultboolSet to true to make this the default tab.