# 标签页 · JGuang UI

> 将相关内容组织为可切换的多个面板。

- 页面: https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/tabs
- 改编自: shadcn/ui 文档 (MIT) @ bc0705384b51252af26dcc65425b216bf5eb063c
- 说明：正文保留英文原文。

> 示例 `tabs-demo`: 交互预览见 https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/tabs


## Installation


  

**Command**


  

**Manual**


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


### Install the following dependencies:


```bash
npm install radix-ui
```


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


[View complete source: components/ui/tabs.tsx](/r/jguang-ui/radix/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.


> 示例 `tabs-line`: 交互预览见 https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/tabs


## Vertical

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


> 示例 `tabs-vertical`: 交互预览见 https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/tabs


## Disabled


> 示例 `tabs-disabled`: 交互预览见 https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/tabs


## Icons


> 示例 `tabs-icons`: 交互预览见 https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/tabs


## RTL

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


> 示例 `tabs-rtl`: 交互预览见 https://jiguang132.com/zh/systems/jguang-ui/docs/components/radix/tabs


## API Reference

See the [Radix Tabs](https://www.radix-ui.com/docs/primitives/components/tabs#api-reference) documentation.

---

JGuang 全部资源索引: https://jiguang132.com/llms.txt
