Sections
Get Started
Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Drawer
- Dropdown Menu
- Empty
- Field
- Form
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Number Field
- Pagination
- Pin Input
- Popover
- Progress
- Radio Group
- Range Calendar
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Stepper
- Switch
- Table
- Tabs
- Tags Input
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Forms
A set of layered sections of content—known as tab panels—that are displayed one at a time.
<!-- AUTO-GENERATED BY scripts/generate-custom-demos.ts. DO NOT EDIT DIRECTLY. -->
<script setup lang="ts">
import {
VTabs,
VTabsContent,
VTabsList,
VTabsTrigger,
} from '@ui-kit/src/components/Base/VTabs'
import VButton from '@ui-kit/src/components/Base/VButton/VButton.vue'
</script>
<template>
<VTabs default-value="account" class="w-full max-w-lg">
<VTabsList>
<VTabsTrigger value="account">Account</VTabsTrigger>
<VTabsTrigger value="security">Security</VTabsTrigger>
</VTabsList>
<VTabsContent value="account">
<div class="grid gap-4">
<div>
<p>Account settings</p>
<p>Update the basics for this workspace.</p>
</div>
<label class="grid gap-1">
<span>Workspace name</span>
<input value="Webdevelop UI Kit">
</label>
<VButton>
Save account
</VButton>
</div>
</VTabsContent>
<VTabsContent value="security">
<div class="grid gap-4">
<div>
<p>Security</p>
<p>Control access and release approvals.</p>
</div>
<label class="grid gap-1">
<span>Approval group</span>
<input value="Frontend leads">
</label>
<VButton variant="outlined">
Save security
</VButton>
</div>
</VTabsContent>
</VTabs>
</template>Installation
pnpm dlx shadcn-vue@latest add tabs
Usage
<script setup lang="ts">
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs'
</script>
<template>
<Tabs default-value="account">
<TabsList>
<TabsTrigger value="account">
Account
</TabsTrigger>
<TabsTrigger value="password">
Password
</TabsTrigger>
</TabsList>
<TabsContent value="account">
Make changes to your account here.
</TabsContent>
<TabsContent value="password">
Change your password here.
</TabsContent>
</Tabs>
</template>