---
title: Tabs
description: A set of layered sections of content—known as tab panels—that are displayed one at a time.
link:
  doc: https://kobalte.dev/docs/core/components/tabs
  api: https://kobalte.dev/docs/core/components/tabs#api-reference
---

<ComponentPreview name="tabs-demo">

```tsx file=<rootDir>/apps/docs/src/registry/examples/tabs-demo.tsx

```

</ComponentPreview>

## Installation

<ComponentInstallation>

<Step>

<StepItem>Copy and paste the following code into your project:</StepItem>

  <ComponentSourceTabs>

    ```tsx title="components/ui/tabs" file=<rootDir>/apps/docs/src/registry/ui/tabs.tsx

    ```

    ```tsx title="components/ui/tabs" file=<rootDir>/apps/unocss-playground/src/registry/ui/tabs.tsx

    ```

  </ComponentSourceTabs>

</Step>

</ComponentInstallation>

## Usage

```tsx
import {
  Tabs,
  TabsContent,
  TabsIndicator,
  TabsList,
  TabsTrigger,
} from "@components/ui/v4/tabs"
```

```tsx
<Tabs>
  <TabsList>
    <TabsTrigger />
    <TabsTrigger />
    <TabsIndicator />
  </TabsList>
  <TabsContent />
  <TabsContent />
</Tabs>
```

## Examples

<ComponentPreview name="tabs-orientation-demo">

```tsx file=<rootDir>/apps/docs/src/registry/examples/tabs-orientation-demo.tsx

```

</ComponentPreview>
