packages/docs/src/pages/en/components/tabs.md
The v-tabs component is used for hiding content behind a selectable item. This can also be used as a pseudo-navigation for a page, where the tabs are links and the tab-items are the content.
The v-tabs component is a styled extension of v-slide-group. It provides an easy to use interface for organizing content into separate sections.
| Component | Description |
|---|---|
| v-tabs | Primary Component |
| v-tab | Sub-component used for modifying the v-tabs state |
The align-tabs prop will align tabs to the start, center, or end of its container.
Make v-tabs line up with the v-toolbar-title component by setting the align-tabs prop to title (v-app-bar-nav-icon or v-btn must be used in v-toolbar).
The center-active prop will make the active tab always centered.
<ExamplesExample file="v-tabs/prop-center-active" />prev-icon and next-icon can be used for applying custom pagination icons.
<ExamplesExample file="v-tabs/prop-icons" />The fixed-tabs prop forces v-tab items to take up all available space up to 300px width, and centers them.
The grow prop will make the tab items take up all available space with no limit.
<ExamplesExample file="v-tabs/prop-grow" />Using stacked increases the v-tabs height to 72px to allow for both icons and text to be displayed.
With slider-transition you can change default animation of the slider so it better fits with the app design.
<ExamplesExample file="v-tabs/prop-slider-transition" />If the tab items overflow their container, pagination controls will appear on desktop. For mobile devices, arrows will only display with the show-arrows prop.
<ExamplesExample file="v-tabs/misc-pagination" />The direction prop allows for v-tab components to stack vertically.
Vertical tabs can be customized with spaced prop to move the text away from the icon.
<ExamplesExample file="v-tabs/prop-spaced" />It is common to put v-tabs inside the extension slot of v-toolbar.
On mobile you can use v-tab items with just icons to conserve space.
Tabs can be dynamically added and removed. In this example when we add a new tab, we automatically change our model to match. As we add more tabs and overflow the container, the selected item will be automatically scrolled into view. Remove all v-tab items and the slider will disappear.
You can use a menu to hold additional tabs, swapping them out on the fly.
<ExamplesExample file="v-tabs/misc-overflow-to-menu" />Use the tab and item slots with the items prop to reduce the markup required to build tabs.
<ExamplesExample file="v-tabs/slot-tabs" />