Utility
Terminal
█
tabbed-content-demo █
Loading preview... █
█
█
█
█
█
█
█
█
█
█
█
█
█
█
█Installation
$ pnpm dlx shadcn@latest add @termcn/opentui/tabbed-content
Usage
import { TabbedContent } from "@/components/ui/tabbed-content";<TabbedContent
defaultTab="overview"
tabs={[
{
id: "overview",
label: "Overview",
content: <Text>Overview content.</Text>,
},
{ id: "logs", label: "Logs", content: <Text>Logs content.</Text> },
]}
/>API Reference
TabbedContent
| Prop | Type | Default |
|---|---|---|
tabs | TabbedContentTab[] | required |
defaultTab | string | - |
activeTab | string | - |
onChange | (id: string) => void | - |
tabBarStyle | "underline" | "box" | "minimal" | "underline" |
TabbedContentTab
| Prop | Type | Default |
|---|---|---|
id | string | required |
label | string | required |
content | ReactNode | required |
disabled | boolean | - |