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

    7
  • Chart

    Chart

    3
  • Radio Card

    Radio Card

    2
  • Badge

    Badge

    2
  • Card

    Card

    2
  • Switch

    Switch

    1
  • Checkbox Card

    Checkbox Card

    1
  • Input

    Input

    1

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    162
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    427
  • Meniscus — Liquid Bottom Navigation Bar

    Meniscus — Liquid Bottom Navigation Bar

    27
  • Sidebar

    Sidebar

    441
  • Tabs

    Tabs

    38
  • Footer Section

    Footer Section

    2
  • Sidebar

    Sidebar

    366
  • Pagination

    Pagination

    119