---
description: A set of tab panels that are displayed one at a time.
links:
- label: GitHub
icon: i-simple-icons-github
to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/navigation/Tabs.vue
---
## Usage
Pass an array to the `items` prop of the Tabs component. Each item can have the following properties:
- `label` - The label of the item.
- `slot` - A key to customize the item with a slot.
- `content` - The content to display in the panel by default.
- `disabled` - Determines whether the item is disabled or not.
::component-example
#default
:tabs-example-basic{class="w-full"}
#code
```vue
```
::
### Vertical
You can change the orientation of the tabs by setting the `orientation` prop to `vertical`.
::component-example
#default
:tabs-example-vertical{class="w-full"}
#code
```vue
```
::
### Default index
You can set the default index of the tabs by setting the `default-index` prop.
::component-example
#default
:tabs-example-index{class="w-full"}
#code
```vue
```
::
::callout{icon="i-heroicons-exclamation-triangle"}
This will have no effect if you are using a `v-model` to control the selected index.
::
### Listen to changes
You can listen to changes by using the `@change` event. The event will emit the index of the selected item.
::component-example
#default
:tabs-example-change{class="w-full"}
#code
```vue
```
::
### Control the selected index
Use a `v-model` to control the selected index.
::component-example
#default
:tabs-example-v-model{class="w-full"}
#code
```vue
```
::
::callout{icon="i-heroicons-information-circle"}
In this example, we are binding tabs to the route query. Refresh the page to see the selected tab change.
::
## Slots
You can use slots to customize the buttons and items content of the Accordion.
### `default`
Use the `#default` slot to customize the content of the trigger buttons. You will have access to the `item`, `index`, `selected` and `disabled` in the slot scope.
::component-example
#default
:tabs-example-default-slot
#code
```vue
{{ index + 1 }}. {{ item.label }}
```
::
### `item`
Use the `#item` slot to customize the items content. You will have access to the `item`, `index` and `selected` properties in the slot scope.
::component-example
#default
:tabs-example-item-slot
#code
```vue
onSubmit(item.key === 'account' ? accountForm : passwordForm)">
{{ item.label }}
{{ item.description }}
Save {{ item.key === 'account' ? 'account' : 'password' }}
```
::
You can also pass a `slot` property to customize a specific item.
::component-example
#default
:tabs-example-item-custom-slot
#code
```vue
{{ item.label }}
Make changes to your account here. Click save when you're done.
Save account
{{ item.label }}
Change your password here. After saving, you'll be logged out.
Save password
```
::
## Props
:component-props
## Preset
:component-preset