Cloud|

@k2b/ui

Tabs

Accessible controlled peer views with compositional or data-driven items.

Tabs@k2b/ui

Tabs provide roving keyboard navigation and keep each trigger beside its panel content. The options prop remains available for data-driven tabs.

Project summary and current health.

TSX

Copy
const [tab, setTab] = createSignal("overview");
<Tabs ariaLabel="Project sections" value={tab} onValueChange={setTab}>
<Tabs.Item value="overview" label="Overview" icon="ti ti-layout-dashboard">
<Overview />
</Tabs.Item>
<Tabs.Item value="activity" label="Activity" icon="ti ti-activity">
<Activity />
</Tabs.Item>
<Tabs.Item value="archive" label="Archive" disabled>
<Archive />
</Tabs.Item>
</Tabs>

Tabs switches between a small controlled set of peer views. Prefer colocated Tabs.Item children when each tab owns content; use options for data-driven or routed tabs.

Use Tabs

Use tabs for peer views. Use Disclosure for optional detail that does not replace the current view.

Import

tsx
import { Tabs } from "@k2b/ui";

Example

tsx
const [tab, setTab] = createSignal("overview");

<Tabs ariaLabel="Project sections" value={tab} onValueChange={setTab}>
  <Tabs.Item value="overview" label="Overview" icon="ti ti-layout-dashboard">
    <Overview />
  </Tabs.Item>
  <Tabs.Item value="activity" label="Activity" icon="ti ti-activity">
    <Activity />
  </Tabs.Item>
</Tabs>

value may be a Solid accessor or a value. onValueChange receives the selected item value. Each item accepts value, label, optional icon, optional disabled, and panel content as children.

Data-driven API

Pass options when tabs come from data or content is rendered by a router. Each option has the same value, label, icon, and disabled contract plus an optional panel.

Accessibility

Tabs link triggers and panels with ARIA ids. Arrow keys move by orientation; Home and End select the edges. Selection and roving focus require hydration.

Runtime

Tabs render complete server HTML. Selection and roving focus require hydration.

Connect a coding agent

The Cloud skill provides compact working instructions. MCP supplies exact current documentation when details matter.

CLI command
bunx skills add https://docs.example.com

This command installs the working instructions published by this website in the selected coding agent.

For exact, current details, also connect the MCP server through one of the agent tabs.

Installation uses the open-source Vercel Skills CLI.

The skill and MCP complement each other: the skill describes workflows, while MCP supplies current documentation.