Docs
Tabs

Tabs

A set of layered sections of content—known as tab panels—that are displayed one at a time.

Loading...
Loading...

Installation

npx shadcn-ng@latest add tabs
npm
yarn
pnpm
bun

Copy and paste the following code into your project.

Update the import paths to match your project setup.

Usage

import {
    UbTabsContentDirective,
    UbTabsDirective,
    UbTabsListDirective,
    UbTabsTriggerDirective
} from '@/components/ui/tabs.directive';
<div ubTabs defaultValue="account" class="w-[400px]">
    <div ubTabsList>
        <button ubTabsTrigger value="account">Account</button>
        <button ubTabsTrigger value="password">Password</button>
    </div>
 
    <section ubTabsContent value="account">Make changes to your account here.</section>
    <section ubTabsContent value="password">Change your password here.</section>
</div>