apps/v4/content/docs/components/radix/tabs.mdx
<ComponentPreview styleName="radix-nova" name="tabs-demo" previewClassName="h-96" />
npx shadcn@latest add tabs
<Step>Install the following dependencies:</Step>
npm install radix-ui
<Step>Copy and paste the following code into your project.</Step>
<ComponentSource name="tabs" title="components/ui/tabs.tsx" styleName="radix-nova" />
<Step>Update the import paths to match your project setup.</Step>
</Steps> </TabsContent> </CodeTabs>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>
Use the variant="line" prop on TabsList for a line style.
Use orientation="vertical" for vertical tabs.
To enable RTL support in shadcn/ui, see the RTL configuration guide.
<ComponentPreview styleName="radix-nova" name="tabs-rtl" direction="rtl" />See the Radix Tabs documentation.