Components组件Radix UIRadix UI 组件
Tabs
A set of layered sections of content—known as tab panels—that are displayed one at a time.
Partially translated: Chinese navigation, titles, descriptions, and common headings. The technical body is currently in English.
Loading JGuang UI example…
Installation
Command
Manual
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
Install the following dependencies:
npm install radix-ui
Copy and paste the following code into your project.
View complete source: components/ui/tabs.tsx
Update the import paths to match your project setup.
Usage
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…
RTL
To enable RTL support in JGuang UI, see the RTL configuration guide.
Loading JGuang UI example…
API Reference
See the Radix Tabs documentation.
Source: components/radix/tabs.mdx
Technical documentation for JGuang UI.