James Shopland

Tabs [react-aria-components]

Navigation 7

About

Tabs organize content into multiple sections and allow users to navigate between them.

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

Code

How Tabs [react-aria-components] is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { Tab, TabList, TabPanel, Tabs } from "@/components/ui/tabs"

export function TabDemo() {
  return (
    <Tabs>
      <TabList aria-label="History of Ancient Rome">
        <Tab id="FoR">Founding of Rome</Tab>
        <Tab id="MaR">Monarchy and Republic</Tab>
        <Tab id="Emp">Empire</Tab>
      </TabList>
      <TabPanel id="FoR">
        Arma virumque cano, Troiae qui primus ab oris.
      </TabPanel>
      <TabPanel id="MaR">Senatus Populusque Romanus.</TabPanel>
      <TabPanel id="Emp">Alea jacta est.</TabPanel>
    </Tabs>
  )
}

Dependencies

More by James Shopland

View all
  • Tag Group [react-aria-components]

    Tag Group [react-aria-components]

    101
  • Date Range Picker [react-aria-components]

    Date Range Picker [react-aria-components]

    93
  • Grid List [react-aria-components]

    Grid List [react-aria-components]

    76
  • Switch [react-aria-components]

    Switch [react-aria-components]

    75
  • Select [react-aria-components]

    Select [react-aria-components]

    52
  • Range Calendar [react-aria-components]

    Range Calendar [react-aria-components]

    42
  • Menu

    Menu

    38
  • Popover

    Popover

    38

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    179
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    452
  • Meniscus — Liquid Bottom Navigation Bar

    Meniscus — Liquid Bottom Navigation Bar

    37
  • Sidebar

    Sidebar

    444
  • Tabs

    Tabs

    38
  • Stacked Circular Footer

    Stacked Circular Footer

    470
  • Sidebar

    Sidebar

    367
  • Footer

    Footer

    470