Codegroup
Tabbed code blocks for multiple languages
Group code blocks with tabs for different languages or examples.
Usage
Live
Components
CodeGroup
Container for tabbed code blocks.
| prop | type | default | description |
|---|---|---|---|
| defaultValue | string | - | Initially active tab |
| group | string | "global" | Shared persistence key |
| persist | boolean | true | Store selected tab in local storage |
CodeTabs
Container for tab buttons.
CodeTab
Individual tab button and content.
| prop | type | default | description |
|---|---|---|---|
| value | string | required | Unique identifier |
| label | string | required | Tab label text |
Keyboard
| key | action |
|---|---|
ArrowLeft / ArrowRight | previous / next tab |
Home / End | first / last tab |