KTabs
示例
Default Tabs
Content for Tab 1
Line Tabs (Day Theme)
Content for Tab 1
Line Tabs (Night Theme)
Content for Tab 1
Tab navigation component with v-model:activeTab binding and default/line variants. Exposes the active tab via a scoped slot.
Props
| Name | Type | Default | Description |
|---|---|---|---|
| tabs | Array<{ value: string; label: string; disabled?: boolean }> | — | (required) Array of tab items to render. |
| activeTab | string | '' | The value of the currently active tab. |
| variant | 'default' | 'line' | 'default' | Visual variant. 'default' uses a pill-style tab list; 'line' uses an underline indicator. |
| theme | 'auto' | 'day' | 'night' | 'auto' | Theme mode. auto follows the current theme; day and night force a specific mode. |
Emits
| Name | Parameters | Description |
|---|---|---|
| update:activeTab | (value: string) | Emitted when a tab is selected. |
Slots
| Name | Description |
|---|---|
| default | Scoped slot that receives { activeTab } for rendering tab panels. |
Basic Usage
Element is missing end tag.