Marvz UI
Components

Tabs

An accessible tabs component that follows the WAI-ARIA Tabs Design Pattern. Each tab in the tab list has associated content, with only the selected tab's content being displayed.

Docs

This is the Account tab content.

Installation

pnpx shadcn@latest add https://ui.marviuz.me/r/tabs.json

Usage

import {
  TabsProvider,
  TabsRoot,
  TabsList,
  TabsTrigger,
  TabsContent,
} from './tabs';
<TabsProvider defaultValue="account">
  <TabsRoot className="mx-auto w-full max-w-md">
    <TabsList>
      <TabsTrigger value="account">Account</TabsTrigger>
      <TabsTrigger value="password">Password</TabsTrigger>
    </TabsList>

    <TabsContent value="account">
      <p>This is the Account tab content.</p>
    </TabsContent>

    <TabsContent value="password">
      <p>This is the Password tab content.</p>
    </TabsContent>
  </TabsRoot>
</TabsProvider>

On this page