- Accordion new
- ActionSheet new
- Alert new
- Alert Dialog new
- Angle Slider new
- Autocomplete new
- Avatar new
- Badge new
- Breadcrumb new
- Button new
- Button Group new
- Card new
- Carousel new
- Checkbox new
- Clipboard new
- Collapsible new
- Color Picker new
- Date Input new
- Date Picker new
- Dialog new
- DialogCaller new
- Drawer beta
- Editable new
- Empty new
- Field new
- Fieldset new
- File Upload new
- Filters new
- Floating Panel new
- Hover Card new
- Image new
- Image Cropper new
- Input new
- Input Group new
- Json Tree View new
- Kbd new
- Listbox new
- Marquee new
- Menu new
- Number Input new
- Pagination new
- Password Input new
- PhoneField new
- Pin Input new
- Popover new
- Progress Circular new
- Progress Linear new
- Qr Code new
- Radio Group new
- Rating Group new
- Scroll Area new
- ScrollSpy new
- Segment Group new
- Select new
- Separator new
- Sidebar new
- Signature Pad new
- Skeleton new
- Slider new
- Splitter new
- Steps new
- Switch new
- Table new
- Tabs new
- Tags Input new
- Textarea new
- Timeline new
- Timer new
- Toast new
- Toc new
- Toggle new
- Toggle Group new
- Tooltip new
- Tour new
- Tree View new
- Typography new
Tabs
Vue tabs to switch between related views or panels in a compact, keyboard-accessible layout.
Installation
Install from the Vuzeno registry:
bunx --bun shadcn-vue@latest add https://vuzeno.com/r/tabs.json
npx shadcn-vue@latest add https://vuzeno.com/r/tabs.json
yarn dlx shadcn-vue@latest add https://vuzeno.com/r/tabs.json
pnpm dlx shadcn-vue@latest add https://vuzeno.com/r/tabs.json
Usage
<script setup lang="ts">
import { Tabs } from "@/components/ui/tabs";
</script>
<template>
<Tabs.Root>
<!-- … -->
</Tabs.Root>
</template>
Composition
Tabs.Root
├── Tabs.TabList
│ ├── Tabs.TabTrigger
│ ├── Tabs.TabTriggerIndicator
│ └── Tabs.TabIndicator
├── Tabs.TabContent
├── Tabs.Context
└── Tabs.RootProvider
Examples
Controlled
To create a controlled Tabs component, manage the current selected tab using the value prop and update it when the onValueChange event handler is called.
Root Provider
An alternative way to control the tabs is to use the RootProvider component and the useTabs hook. This way you can access the state and methods from outside the component.
Indicator
To provide a visual cue for the selected tab, use the Tabs.TabIndicator component with Tabs.TabTriggerIndicator triggers.
Disabled
To disable a tab, pass the disabled prop to the Tabs.TabTrigger component.
Vertical
The default orientation of the tabs is horizontal. To change the orientation, set the orientation prop to vertical.
Lazy Mount
Lazy mounting renders tab content only when the tab is first activated. Use lazy-mount and unmount-on-exit on Tabs.Root to free resources when a tab is deactivated.
Manual Activation
By default, the tab can be selected when it receives focus from either the keyboard or pointer interaction. With activation-mode="manual", the tab is selected with the Enter key or by clicking on the tab.
Links
Use the as-child prop to render tab triggers as anchor links. This is useful for SEO and allows tabs to work with browser navigation.
API
See Ark UI Tabs docs for full props and examples.