Skip to content
Look

Shared with the landing page. Theme is the select beside this menu.

Tabs

Open .md
Live preview

Loading example…

To sync the active tab with a search param, use the controlled pattern: value={param} + onValueChange={(v) => updateParam(v)}.

import { Tabs } from "@jcsoftdev/ui/navigation";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/navigation/tabs.

export const Default: Story = {};

Source of the Storybook story.

Prop Type Default Description
value string Controlled active tab.
defaultValue string Initial active tab when uncontrolled.
onValueChange ((value: string) => void)
orientation "horizontal" | "vertical" "horizontal"
dir "ltr" | "rtl" "ltr"
activationMode "automatic" | "manual" "automatic" automatic activates a tab on focus; manual waits for Enter, Space or a click.

* marks a required prop.

It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).

packages/ui/src/navigation/tabs/tabs.tsx