JGuang / JGuang UI
Components组件Radix UIRadix UI 组件

标签页

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

中文模式已适配导航、标题、简介、目录与常用章节名称。翻译状态:部分完成;技术正文目前仍为英文。
Loading JGuang UI example…

安装

Command

Manual

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

安装以下依赖:

npm install radix-ui

将以下代码复制到你的项目中。

View complete source: components/ui/tabs.tsx

根据项目配置更新导入路径。

用法

import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
<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:

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

Line

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

Loading JGuang UI example…

Vertical

Use orientation="vertical" for vertical tabs.

Loading JGuang UI example…

Disabled

Loading JGuang UI example…

Icons

Loading JGuang UI example…

从右到左布局

To enable RTL support in JGuang UI, see the RTL configuration guide.

Loading JGuang UI example…

API 参考

See the Radix Tabs documentation.

来源: components/radix/tabs.mdx

JGuang UI 技术文档。

On this page