# Tabs · JGuang UI

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

- Page: https://jiguang132.com/systems/jguang-ui/docs/components/base/tabs
- Based on: shadcn/ui documentation (MIT) @ bc0705384b51252af26dcc65425b216bf5eb063c

> Example `tabs-demo`: interactive preview on https://jiguang132.com/systems/jguang-ui/docs/components/base/tabs


## Installation


  

**Command**


  

**Manual**


```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```


### Install the following dependencies:


```bash
npm install @base-ui/react
```


### Copy and paste the following code into your project.


[View complete source: components/ui/tabs.tsx](/r/jguang-ui/base/tabs.json)


### Update the import paths to match your project setup.


## Usage

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

```tsx showLineNumbers
<Tabs defaultValue="account" className="w-[400px]">
  <TabsList>
    <TabsTrigger value="account">Account</TabsTrigger>
    <TabsTrigger value="password">Password</TabsTrigger>
  </TabsList>
  <TabsContent value="account">Make changes to your account here.</TabsContent>
  <TabsContent value="password">Change your password here.</TabsContent>
</Tabs>
```

## Composition

Use the following composition to build `Tabs`:

```text
Tabs
├── TabsList
│   ├── TabsTrigger
│   └── TabsTrigger
├── TabsContent
└── TabsContent
```

## Line

Use the `variant="line"` prop on `TabsList` for a line style.


> Example `tabs-line`: interactive preview on https://jiguang132.com/systems/jguang-ui/docs/components/base/tabs


## Vertical

Use `orientation="vertical"` for vertical tabs.


> Example `tabs-vertical`: interactive preview on https://jiguang132.com/systems/jguang-ui/docs/components/base/tabs


## Disabled


> Example `tabs-disabled`: interactive preview on https://jiguang132.com/systems/jguang-ui/docs/components/base/tabs


## Icons


> Example `tabs-icons`: interactive preview on https://jiguang132.com/systems/jguang-ui/docs/components/base/tabs


## RTL

To enable RTL support in JGuang UI, see the [RTL configuration guide](/systems/jguang-ui/docs/rtl).


> Example `tabs-rtl`: interactive preview on https://jiguang132.com/systems/jguang-ui/docs/components/base/tabs


## API Reference

See the [Base UI Tabs](https://base-ui.com/react/components/tabs#api-reference) documentation.

---

Index of all JGuang resources: https://jiguang132.com/llms.txt
