For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
119

Tabs

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

Overview
View your key metrics and recent project activity. Track progress across all your active projects.
You have 12 active projects and 3 pending tasks.
import {
  Card,
  CardContent,
  CardDescription,
  CardHeader,
  CardTitle,

Installation

$ pnpm dlx shadcn@latest add https://shadcn-cssinjs.com/r/tabs.json

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.

import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";

export function TabsLine() {
  return (
    <Tabs defaultValue="overview">
      <TabsList variant="line">

Vertical

Use orientation="vertical" for vertical tabs.

import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";

export function TabsVertical() {
  return (
    <Tabs defaultValue="account" orientation="vertical">
      <TabsList>

Disabled

import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";

export function TabsDisabled() {
  return (
    <Tabs defaultValue="home">
      <TabsList>

Icons

import { AppWindowIcon, CodeIcon } from "lucide-react";

import { Tabs, TabsList, TabsTrigger } from "@/components/ui/tabs";

export function TabsIcons() {
  return (

RTL

To enable RTL support in shadcn/ui, see the RTL configuration guide.

نظرة عامة
عرض مقاييسك الرئيسية وأنشطة المشروع الأخيرة. تتبع التقدم عبر جميع مشاريعك النشطة.
لديك ١٢ مشروعًا نشطًا و٣ مهام معلقة.
"use client";

import * as React from "react";

import { useTranslation } from "@/components/language-selector";
import type { Translations } from "@/components/language-selector";

API Reference

See the Base UI Tabs documentation.