Mahmoud Ilyan

Tabs

Navigation

About

A tabbed interface for switching between peer sections of content on the same page, with underline (line) and compact (pill) visual styles in horizontal or vertical orientation.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Tabs to your project and fits it to your theme.

Code

How Tabs is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import * as React from "react";
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs";

export default function ControlledTabsDemo() {
  const [tab, setTab] = React.useState("overview");

  return (
    <Tabs value={tab} onValueChange={setTab}>
      <TabsList>
        <TabsTrigger value="overview">Overview</TabsTrigger>
        <TabsTrigger value="analytics">Analytics</TabsTrigger>
      </TabsList>
      <TabsContent value="overview">Overview content</TabsContent>
      <TabsContent value="analytics">Analytics content</TabsContent>
    </Tabs>
  );
}

Dependencies

More by Mahmoud Ilyan

View all
  • Steps

    Steps

    5
  • Chart

    Chart

    2
  • Radio Card

    Radio Card

    1
  • Switch

    Switch

    1
  • Input

    Input

    1
  • Badge

    Badge

    1
  • Textarea

    Textarea

  • Progress

    Progress

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    100
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    295
  • Sidebar

    Sidebar

    422
  • Pagination with Ellipsis

    Pagination with Ellipsis

    25
  • Pagination

    Pagination

    3
  • Tabs

    Tabs

    33
  • Menu

    Menu

    23
  • Breadrcrumb

    Breadrcrumb

    6