Tabs
Group related Markdown with accessible, optionally synchronized tabs.
On this page
Usage
Use tabs and tab-item for explanations, commands, or mixed Markdown. Each item requires a title. Provide a stable value when synchronizing tabs; values must be unique within a group.
Add Indocio to your Nuxt app through extends.
export default defineAppConfig({
indocio: {
docs: {
content: { width: '42rem' },
sidebar: { enabled: true, width: 240, collapsible: false },
toc: { enabled: true, position: 'content', depth: 3 },
breadcrumbs: true,
footer: true,
navigation: true,
search: true,
actions: { copyLink: true },
},
spaces: { switcher: 'dropdown' },
},
})
These two groups share the framework key. Change either group to update both.
Nuxt supplies routing, server rendering, and component registration.
| Prop | Default | Purpose |
|---|---|---|
label | Examples | Accessible tab-group label |
default-value | First item | Initial item value |
sync | Unset | Share the selected value with groups using this key during navigation |
Groups without sync are independent. Package-manager code blocks automatically share their package-manager selection. Use Code tabs for filename-labeled code fences.
Tab Item
Each tab-item must be a direct child of tabs. The default slot contains the panel’s Markdown.
Props
| Prop | Type | Default |
|---|---|---|
title | string | Required |
value | string | Derived from the title |
The default slot holds the panel's Markdown. Values must be unique within the group. Supply stable values when using the parent's sync prop.