# Tabs URL: /docs/ui/tabs A multi-variant tabs component for organizing content into switchable panels. import { PreviewCode } from "@/components/docs/preview-code.server"; import { TabsSample, TabsVariantsSample, TabsSizesSample, TabsWithIconsSample, TabsControlledSample, TabsAsLinkSample, TabsAnimatedIndicatorSample, } from "@/components/docs/samples/tabs"; This is a **standalone component** that does not depend on the assistant-ui runtime. Use it anywhere in your application. Installation \[#installation] Usage \[#usage] ```tsx import { Tabs, TabsList, TabsTrigger, TabsContent, } from "@/components/assistant-ui/tabs"; export function Example() { return ( Account Password Account settings here. Password settings here. ); } ``` Examples \[#examples] Variants \[#variants] Use the `variant` prop on `TabsList` to change the visual style. Child components inherit the variant automatically. ```tsx // Muted background with shadow (default) // Underline indicator // Transparent with hover states // Rounded pill buttons // Border with background on active ``` Sizes \[#sizes] Use the `size` prop on `TabsList` to change the tab height. Child components inherit the size automatically. ```tsx // 32px height // 36px height // 40px height ``` With Icons \[#with-icons] Tabs automatically style SVG icons placed inside triggers. Controlled \[#controlled] Use `value` and `onValueChange` for controlled tab state. As Link \[#as-link] Use the `asChild` prop on `TabsTrigger` to render as a different element, like a navigation link. Animated Indicator \[#animated-indicator] All variants feature smooth animated indicators that slide between tabs: | Variant | Indicator Style | | --------- | ------------------------------------ | | `default` | Sliding background with shadow | | `line` | Sliding underline | | `ghost` | Sliding background with hover effect | | `pills` | Sliding pill background | | `outline` | Sliding border | API Reference \[#api-reference] Composable API \[#composable-api] | Component | Description | | ------------- | -------------------------------------------------------------- | | `Tabs` | The root component that manages tab state. | | `TabsList` | The container for tab triggers. Set `variant` and `size` here. | | `TabsTrigger` | An individual tab button. Inherits variant/size from TabsList. | | `TabsContent` | The content panel for a tab. | Tabs \[#tabs] The root component that manages tab state. void", description: "Callback when the active tab changes.", }, { name: "className", type: "string", description: "Additional CSS classes.", }, ]} /> TabsList \[#tabslist] The container for tab triggers. Set `variant` and `size` here to style all child components. TabsTrigger \[#tabstrigger] An individual tab button. TabsContent \[#tabscontent] The content panel for a tab. Style Variants (CVA) \[#style-variants-cva] | Export | Description | | ----------------------------- | ----------------------------------------- | | `tabsListVariants` | Styles for the tabs list container. | | `tabsActiveIndicatorVariants` | Styles for the animated active indicator. | ```tsx import { tabsListVariants, tabsActiveIndicatorVariants, } from "@/components/assistant-ui/tabs";
Custom Tabs Container
```