Use os componentes tabs e tabs-item para exibir Tabs no seu conteúdo.
::callout
Lorem velit voluptate ex reprehenderit ullamco et culpa.
::
::tabs
:::tabs-item{label="Code" icon="i-lucide-code"}
```mdc
::callout
Lorem velit voluptate ex reprehenderit ullamco et culpa.
::
```
:::
:::tabs-item{label="Preview" icon="i-lucide-eye"}
::callout
Lorem velit voluptate ex reprehenderit ullamco et culpa.
::
:::
::
| Prop | Default | Type |
|---|---|---|
defaultValue | '0' | stringThe default tab to select. |
sync | stringSync the selected tab with a local storage key. | |
hash | stringThe hash to scroll to when the tab is selected. | |
modelValue | string | |
ui | { root?: SlotClass; } & { root?: SlotClass; list?: SlotClass; indicator?: SlotClass; trigger?: SlotClass; leadingIcon?: SlotClass; leadingAvatar?: SlotClass; leadingAvatarSize?: SlotClass; label?: SlotClass; trailingBadge?: SlotClass; trailingBadgeSize?: SlotClass; content?: SlotClass; } |
| Slot | Type |
|---|---|
default | {} |
export default defineAppConfig({
ui: {
prose: {
tabs: {
slots: {
root: 'my-5 gap-4'
}
},
tabsItem: {
base: '*:first:mt-0 *:last:mb-0 *:my-1.5'
}
}
}
})
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ui from '@nitro/ui/vite'
export default defineConfig({
plugins: [
vue(),
ui({
ui: {
prose: {
tabs: {
slots: {
root: 'my-5 gap-4'
}
},
tabsItem: {
base: '*:first:mt-0 *:last:mb-0 *:my-1.5'
}
}
}
})
]
})