import { Tabs } from '@precursor/tabs';Example
Project summary and current status.
Recent updates and release notes.
'use client';
import { Tabs, Tab, TabList, TabPanel } from '@precursor/tabs';
export default function Example() {
return (
<Tabs defaultActive="overview" variant="pill">
<TabList label="Project views">
<Tab id="overview">Overview</Tab>
<Tab id="activity">Activity</Tab>
</TabList>
<TabPanel id="overview">
Project summary and current status.
</TabPanel>
<TabPanel id="activity">Recent updates and release notes.</TabPanel>
</Tabs>
);
}
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
defaultActive | string | — | — |
variant | TabsVariant | 'default' | — |
active | string | — | — |
onChange | ((id: string) => void) | — | — |
childrenRequired | React.ReactNode | — | — |