Components
Tabs
Organize content into switchable tab panels.
Basic tabs
Use tabs to present alternative content without taking up extra space:
- JavaScript
- Python
- Bash
function greet(name) {
return `Hello, ${name}!`;
}
def greet(name):
return f"Hello, {name}!"
greet() {
echo "Hello, $1!"
}
Installation tabs
A common use case is showing installation commands for different package managers:
- npm
- yarn
- pnpm
npm install example-package
yarn add example-package
pnpm add example-package
Tabs with mixed content
Tabs can contain any markdown content, not just code:
- Basic Setup
- Advanced Setup
The basic setup requires minimal configuration:
- Install the package
- Import the module
- Call the function
The advanced setup includes additional options:
| Option | Type | Default | Description |
|---|---|---|---|
debug | boolean | false | Enable debug mode |
timeout | number | 5000 | Request timeout |
retries | number | 3 | Retry attempts |