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>
);
}
















