Code Groups
CodeGroup displays code blocks in tabs with language icons.
Stable
- Introduced
- v0.1.3
- Supported through
- Latest
src/main.tsx
// code heresrc/index/html
<!-- Code here -->Tab labels use the code block's title, falling back to its language. Icons are selected automatically from the language, such as TypeScript for tsx and HTML5 for html.
CodeGroup Props3 properties
| Property | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | - | Fenced code blocks to display as tabs. |
defaultIndex | number | 0 | Initially selected tab index. |
className | string | - | Additional classes for the group. |

