James Shopland

Tabs [react-aria-components]

Navigation 5

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]

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

    Date Range Picker [react-aria-components]

    86
  • Grid List [react-aria-components]

    Grid List [react-aria-components]

    71
  • Switch [react-aria-components]

    Switch [react-aria-components]

    68
  • Select [react-aria-components]

    Select [react-aria-components]

    46
  • Range Calendar [react-aria-components]

    Range Calendar [react-aria-components]

    38
  • Popover

    Popover

    35
  • Menu

    Menu

    34

More in Navigation

View all
  • Sidebar

    Sidebar

    280
  • Tabs

    Tabs

    34
  • Navbar

    Navbar

    1
  • Oversized 404 Numeral

    Oversized 404 Numeral

    57
  • Sidebar

    Sidebar

    345
  • Breadrcrumb

    Breadrcrumb

    8
  • Pagination

    Pagination

    91
  • Pagination

    Pagination

    14