Tabs
A row of tabs, each showing its own panel.
A row of tabs, each showing its own panel.
npm install @heroui/react
First time with HeroUI? Set it up once.
/**
* Demo from HeroUI, https://heroui.com (docs example tabs/basic.tsx).
* Apache-2.0, Copyright 2025 NextUI Inc. Full text: https://github.com/heroui-inc/heroui/blob/main/LICENSE
* Changed for Tastebud: a default export (HeroUI's docs use named ones).
*/
import {Tabs} from "@heroui/react";
export default function TabsDemo() {
return (
<Tabs className="w-full max-w-md">
<Tabs.ListContainer>
<Tabs.List aria-label="Options">
<Tabs.Tab id="overview">
Overview
<Tabs.Indicator />
</Tabs.Tab>
<Tabs.Tab id="analytics">
Analytics
<Tabs.Indicator />
</Tabs.Tab>
<Tabs.Tab id="reports">
Reports
<Tabs.Indicator />
</Tabs.Tab>
</Tabs.List>
</Tabs.ListContainer>
<Tabs.Panel className="pt-4" id="overview">
<p>View your project overview and recent activity.</p>
</Tabs.Panel>
<Tabs.Panel className="pt-4" id="analytics">
<p>Track your metrics and analyze performance data.</p>
</Tabs.Panel>
<Tabs.Panel className="pt-4" id="reports">
<p>Generate and download detailed reports.</p>
</Tabs.Panel>
</Tabs>
);
}
Changed for this site: A default export (HeroUI's docs use named ones).