Tabs
A set of layered sections of content — known as tab panels — that are displayed one at a time.
veritheme.js
JS init: automatic
Default
Pill-style tabs: the open tab is a card raised on a recessed track — lighter than the track in both themes.
Account
Make changes to your account here.
Password
Change your password here.
Settings
Manage your application preferences.
<div class="vt-w-full vt-max-w-md">
<div data-vt-tab-group="default">
<div role="tablist" aria-label="Account settings" class="vt-tabs-list vt-w-full">
<button role="tab" aria-selected="true" aria-controls="panel-default-account" id="tab-default-account" data-vt-tab="account" class="vt-tabs-trigger vt-active vt-flex-1" tabindex="0">Account</button>
<button role="tab" aria-selected="false" aria-controls="panel-default-password" id="tab-default-password" data-vt-tab="password" class="vt-tabs-trigger vt-flex-1" tabindex="-1">Password</button>
<button role="tab" aria-selected="false" aria-controls="panel-default-settings" id="tab-default-settings" data-vt-tab="settings" class="vt-tabs-trigger vt-flex-1" tabindex="-1">Settings</button>
</div>
<div role="tabpanel" id="panel-default-account" aria-labelledby="tab-default-account" data-vt-panel="account" class="vt-mt-4 vt-card" tabindex="0">
<div class="vt-card-body">
<div>
<h3 class="vt-card-title">Account</h3>
<p class="vt-card-description">Make changes to your account here.</p>
</div>
<div class="vt-space-y-4">
<div class="vt-field">
<label class="vt-label" for="tabs-1-1">
Name
</label>
<input type="text" value="John Doe" class="vt-input" id="tabs-1-1">
</div>
<div class="vt-field">
<label class="vt-label" for="tabs-1-2">
Username
</label>
<input type="text" value="@johndoe" class="vt-input" id="tabs-1-2">
</div>
<button class="vt-btn vt-btn-primary">
Save changes
</button>
</div>
</div>
</div>
<div role="tabpanel" id="panel-default-password" aria-labelledby="tab-default-password" data-vt-panel="password" class="vt-mt-4 vt-card vt-hidden" tabindex="0">
<div class="vt-card-body">
<div>
<h3 class="vt-card-title">Password</h3>
<p class="vt-card-description">Change your password here.</p>
</div>
<div class="vt-space-y-4">
<div class="vt-field">
<label class="vt-label" for="tabs-1-3">
Current password
</label>
<input type="password" class="vt-input" id="tabs-1-3">
</div>
<div class="vt-field">
<label class="vt-label" for="tabs-1-4">
New password
</label>
<input type="password" class="vt-input" id="tabs-1-4">
</div>
<button class="vt-btn vt-btn-primary">
Save password
</button>
</div>
</div>
</div>
<div role="tabpanel" id="panel-default-settings" aria-labelledby="tab-default-settings" data-vt-panel="settings" class="vt-mt-4 vt-card vt-hidden" tabindex="0">
<div class="vt-card-body">
<div>
<h3 class="vt-card-title">Settings</h3>
<p class="vt-card-description">Manage your application preferences.</p>
</div>
</div>
</div>
</div>
</div>
Default With Icons
Pill-style tabs with icons alongside labels.
Manage your account details and preferences.
Update your password and security settings.
Control how and when you receive notifications.
<div class="vt-w-full vt-max-w-md">
<div data-vt-tab-group="default-icons">
<div role="tablist" aria-label="Settings" class="vt-tabs-list vt-w-full">
<button role="tab" aria-selected="true" aria-controls="panel-default-icons-account" id="tab-default-icons-account" data-vt-tab="account" class="vt-tabs-trigger vt-active vt-flex-1" tabindex="0">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M20 21.0001C19.713 17.269 16.7289 14.3151 12.995 14.0662L12 13.9999C11.6446 14.0096 11.3134 14.0225 11.0008 14.0378C7.3 14.2192 4.28417 17.3057 4 21.0001" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><circle cx="12" cy="6.99988" r="4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle>
</svg>Account
</button>
<button role="tab" aria-selected="false" aria-controls="panel-default-icons-security" id="tab-default-icons-security" data-vt-tab="security" class="vt-tabs-trigger vt-flex-1" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M12 13C13.1046 13 14 12.1046 14 11C14 9.89543 13.1046 9 12 9C10.8954 9 10 9.89543 10 11C10 12.1046 10.8954 13 12 13ZM12 13L12 16" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
</svg>Security
</button>
<button role="tab" aria-selected="false" aria-controls="panel-default-icons-notifications" id="tab-default-icons-notifications" data-vt-tab="notifications" class="vt-tabs-trigger vt-flex-1" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M16 18C16 20.2091 14.2091 22 12 22C9.79086 22 8 20.2091 8 18" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M4.43654 18H19.5625C20.2903 18 20.6542 18 20.8648 17.8951C21.274 17.6913 21.4929 17.2359 21.3964 16.789C21.3468 16.559 21.1194 16.2749 20.6648 15.7066L20.4951 15.4944C20.0392 14.9246 19.8113 14.6397 19.6184 14.3409C19.0187 13.4119 18.6477 12.354 18.5356 11.254C18.4995 10.9002 18.4995 10.5353 18.4995 9.8056V8.5C18.4995 8.03572 18.4995 7.80358 18.4867 7.60758C18.2898 4.60304 15.8965 2.20977 12.892 2.01285C12.696 2 12.4638 2 11.9995 2C11.5353 2 11.3031 2 11.1071 2.01285C8.10258 2.20977 5.70931 4.60304 5.51239 7.60758C5.49954 7.80358 5.49954 8.03572 5.49954 8.5V9.8056C5.49954 10.5353 5.49954 10.9002 5.46349 11.254C5.35143 12.354 4.98035 13.4119 4.38067 14.3409C4.18779 14.6397 3.95985 14.9246 3.50401 15.4944L3.33427 15.7066C2.87964 16.2749 2.65233 16.559 2.60268 16.789C2.50621 17.2359 2.72509 17.6913 3.13431 17.8951C3.3449 18 3.70878 18 4.43654 18Z" stroke="currentColor" stroke-width="1.5"></path>
</svg>Notifications
</button>
</div>
<div role="tabpanel" id="panel-default-icons-account" aria-labelledby="tab-default-icons-account" data-vt-panel="account" class="vt-mt-4 vt-card" tabindex="0">
<div class="vt-card-body">
<p class="vt-body-sm vt-text-foreground-muted">Manage your account details and preferences.</p>
</div>
</div>
<div role="tabpanel" id="panel-default-icons-security" aria-labelledby="tab-default-icons-security" data-vt-panel="security" class="vt-mt-4 vt-card vt-hidden" tabindex="0">
<div class="vt-card-body">
<p class="vt-body-sm vt-text-foreground-muted">Update your password and security settings.</p>
</div>
</div>
<div role="tabpanel" id="panel-default-icons-notifications" aria-labelledby="tab-default-icons-notifications" data-vt-panel="notifications" class="vt-mt-4 vt-card vt-hidden" tabindex="0">
<div class="vt-card-body">
<p class="vt-body-sm vt-text-foreground-muted">Control how and when you receive notifications.</p>
</div>
</div>
</div>
</div>
Underline
Tab style with a bottom-border indicator instead of a pill background.
Overview content. This tab shows general information about your project.
Analytics content. Track your project's performance metrics here.
Reports content. Generate and view detailed reports.
<div class="vt-w-full vt-max-w-md">
<div data-vt-tab-group="underline">
<div role="tablist" aria-label="Project sections" class="vt-tabs-list-underline">
<button role="tab" aria-selected="true" aria-controls="panel-underline-overview" id="tab-underline-overview" data-vt-tab="overview" class="vt-tabs-trigger-underline vt-active" tabindex="0">Overview</button>
<button role="tab" aria-selected="false" aria-controls="panel-underline-analytics" id="tab-underline-analytics" data-vt-tab="analytics" class="vt-tabs-trigger-underline" tabindex="-1">Analytics</button>
<button role="tab" aria-selected="false" aria-controls="panel-underline-reports" id="tab-underline-reports" data-vt-tab="reports" class="vt-tabs-trigger-underline" tabindex="-1">Reports</button>
</div>
<div role="tabpanel" id="panel-underline-overview" aria-labelledby="tab-underline-overview" data-vt-panel="overview" class="vt-py-6" tabindex="0">
<p class="vt-body-sm vt-text-foreground-muted">Overview content. This tab shows general information about your project.</p>
</div>
<div role="tabpanel" id="panel-underline-analytics" aria-labelledby="tab-underline-analytics" data-vt-panel="analytics" class="vt-py-6 vt-hidden" tabindex="0">
<p class="vt-body-sm vt-text-foreground-muted">Analytics content. Track your project's performance metrics here.</p>
</div>
<div role="tabpanel" id="panel-underline-reports" aria-labelledby="tab-underline-reports" data-vt-panel="reports" class="vt-py-6 vt-hidden" tabindex="0">
<p class="vt-body-sm vt-text-foreground-muted">Reports content. Generate and view detailed reports.</p>
</div>
</div>
</div>
Underline With Icons
Overview content. General information about your dashboard.
Analytics content. Track performance metrics here.
Reports content. Generate and view detailed reports.
<div class="vt-w-full vt-max-w-md">
<div data-vt-tab-group="underline-icons">
<div role="tablist" aria-label="Dashboard sections" class="vt-tabs-list-underline">
<button role="tab" aria-selected="true" aria-controls="panel-underline-icons-overview" id="tab-underline-icons-overview" data-vt-tab="overview" class="vt-tabs-trigger-underline vt-active" tabindex="0">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M20 21.0001C19.713 17.269 16.7289 14.3151 12.995 14.0662L12 13.9999C11.6446 14.0096 11.3134 14.0225 11.0008 14.0378C7.3 14.2192 4.28417 17.3057 4 21.0001" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><circle cx="12" cy="6.99988" r="4" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></circle>
</svg>Overview
</button>
<button role="tab" aria-selected="false" aria-controls="panel-underline-icons-analytics" id="tab-underline-icons-analytics" data-vt-tab="analytics" class="vt-tabs-trigger-underline" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M16 18C16 20.2091 14.2091 22 12 22C9.79086 22 8 20.2091 8 18" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path><path d="M4.43654 18H19.5625C20.2903 18 20.6542 18 20.8648 17.8951C21.274 17.6913 21.4929 17.2359 21.3964 16.789C21.3468 16.559 21.1194 16.2749 20.6648 15.7066L20.4951 15.4944C20.0392 14.9246 19.8113 14.6397 19.6184 14.3409C19.0187 13.4119 18.6477 12.354 18.5356 11.254C18.4995 10.9002 18.4995 10.5353 18.4995 9.8056V8.5C18.4995 8.03572 18.4995 7.80358 18.4867 7.60758C18.2898 4.60304 15.8965 2.20977 12.892 2.01285C12.696 2 12.4638 2 11.9995 2C11.5353 2 11.3031 2 11.1071 2.01285C8.10258 2.20977 5.70931 4.60304 5.51239 7.60758C5.49954 7.80358 5.49954 8.03572 5.49954 8.5V9.8056C5.49954 10.5353 5.49954 10.9002 5.46349 11.254C5.35143 12.354 4.98035 13.4119 4.38067 14.3409C4.18779 14.6397 3.95985 14.9246 3.50401 15.4944L3.33427 15.7066C2.87964 16.2749 2.65233 16.559 2.60268 16.789C2.50621 17.2359 2.72509 17.6913 3.13431 17.8951C3.3449 18 3.70878 18 4.43654 18Z" stroke="currentColor" stroke-width="1.5"></path>
</svg>Analytics
</button>
<button role="tab" aria-selected="false" aria-controls="panel-underline-icons-reports" id="tab-underline-icons-reports" data-vt-tab="reports" class="vt-tabs-trigger-underline" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" class="vt-w-4 vt-h-4" aria-hidden="true">
<path d="M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z" stroke="currentColor" stroke-width="1.5"></path><path d="M12 13C13.1046 13 14 12.1046 14 11C14 9.89543 13.1046 9 12 9C10.8954 9 10 9.89543 10 11C10 12.1046 10.8954 13 12 13ZM12 13L12 16" stroke="currentColor" stroke-linecap="round" stroke-width="1.5"></path>
</svg>Reports
</button>
</div>
<div role="tabpanel" id="panel-underline-icons-overview" aria-labelledby="tab-underline-icons-overview" data-vt-panel="overview" class="vt-py-6" tabindex="0">
<p class="vt-body-sm vt-text-foreground-muted">Overview content. General information about your dashboard.</p>
</div>
<div role="tabpanel" id="panel-underline-icons-analytics" aria-labelledby="tab-underline-icons-analytics" data-vt-panel="analytics" class="vt-py-6 vt-hidden" tabindex="0">
<p class="vt-body-sm vt-text-foreground-muted">Analytics content. Track performance metrics here.</p>
</div>
<div role="tabpanel" id="panel-underline-icons-reports" aria-labelledby="tab-underline-icons-reports" data-vt-panel="reports" class="vt-py-6 vt-hidden" tabindex="0">
<p class="vt-body-sm vt-text-foreground-muted">Reports content. Generate and view detailed reports.</p>
</div>
</div>
</div>
Guidelines
Anatomy
div[data-vt-tab-group] ← Scoping wrapper
├── div[role="tablist"] ← Tab buttons container
│ ├── button[role="tab"] ← Tab button (active)
│ └── button[role="tab"] ← Tab button (inactive)
├── div[role="tabpanel"] ← Visible panel
└── div[role="tabpanel"].vt-hidden ← Hidden panel
API Reference
| Class | Type | Description |
|---|---|---|
vt-tabs-list |
Base | Pill tab list — a track on the page surface, 4px inset and gap |
vt-tabs-list-underline |
Base | Underline tab list — a line under the tabs |
vt-tabs-trigger |
Part | Pill tab — label with an optional 16px icon; radius is the list radius less its padding and border, so the corners run parallel in any theme shape |
vt-tabs-trigger-underline |
Part | Underline tab — label with an optional 16px icon |
vt-active |
State | The open tab: a card on the track, lighter than it in light and dark themes, with a small shadow (pill) — or a brand line (underline) |
vt-tabs-list-sm |
Size | Compact pill list (32px): 2px padding, 12px labels; the tab radius follows the same rule |
data-vt-tab-group |
Modifier | HTML attribute on wrapper — scopes tab switching |
data-vt-tab/data-vt-panel |
Modifier | HTML attributes linking tabs to their panels |
Accessibility
| Feature | Details |
|---|---|
| Roles | tablist, tab, and tabpanel roles for proper semantics |
| Selection | aria-selected="true" on the active tab |
| Association | aria-controls and aria-labelledby link tabs to panels |
| Keyboard | Arrow keys move between tabs, Home/End jump to first/last |
| Focus | Only the active tab is in tab order (tabindex="0"), others are tabindex="-1" |