Tabs
Tabbed content navigation
Start Here
Start from the smallest working snippet, then move to interactive examples and the full API contract below.
Styled quick start
Copy this entrypoint first. It includes the imports required to get the component on screen.
<script lang="ts">
import '@dryui/ui/themes/default.css';
import '@dryui/ui/themes/dark.css';
import { Tabs } from '@dryui/ui';
</script>
<Tabs.Root bind:value={activeTab}>
<Tabs.List>
<Tabs.Trigger value="one">Tab 1</Tabs.Trigger>
<Tabs.Trigger value="two">Tab 2</Tabs.Trigger>
</Tabs.List>
<Tabs.Content value="one">First panel</Tabs.Content>
<Tabs.Content value="two">Second panel</Tabs.Content>
</Tabs.Root>Import options
Root package
import { Tabs } from '@dryui/ui'Per-component subpath
import { Tabs } from '@dryui/ui/tabs'Customize
Use the interactive examples to see common variants, states, and composition patterns before building your own.
Basic Tabs
Manage your account details here.
<Tabs.Root value="account">
<Tabs.List>
<Tabs.Trigger value="account">Account</Tabs.Trigger>
<Tabs.Trigger value="password">Password</Tabs.Trigger>
<Tabs.Trigger value="settings">Settings</Tabs.Trigger>
</Tabs.List>
<Tabs.Content value="account">
<p>Manage your account details here.</p>
</Tabs.Content>
<Tabs.Content value="password">
<p>Change your password here.</p>
</Tabs.Content>
<Tabs.Content value="settings">
<p>Configure your settings here.</p>
</Tabs.Content>
</Tabs.Root>Vertical Tabs
General settings panel.
<Tabs.Root value="tab1" orientation="vertical">
<Tabs.List>
<Tabs.Trigger value="tab1">General</Tabs.Trigger>
<Tabs.Trigger value="tab2">Billing</Tabs.Trigger>
<Tabs.Trigger value="tab3">Notifications</Tabs.Trigger>
</Tabs.List>
<Tabs.Content value="tab1">General settings</Tabs.Content>
<Tabs.Content value="tab2">Billing settings</Tabs.Content>
<Tabs.Content value="tab3">Notification settings</Tabs.Content>
</Tabs.Root>Structure
Compound components always start with Tabs.Root. Use this structure block to understand required wrappers before you wire state or styling.
Tabs.Root
Tabs.List
Tabs.Trigger
Tabs.Content Tabs.List groups the triggers, while Tabs.Content stays as a sibling of Tabs.List under Tabs.Root.
Compose
The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.
Compound component. Start with Tabs.Root, then add only the parts you need.
Tabs.Root
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
value | string | '' | — | — |
orientation | horizontalvertical | — | — | — |
activationMode | automaticmanual | — | — | — |
children | Snippet | — | ✓ | — |
Forwards <div> attributes via rest props. Common examples: id, style, role.
Tabs.List
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
children | Snippet | — | ✓ | — |
Forwards <div> attributes via rest props. Common examples: id, style, role.
Tabs.Trigger
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
value | string | — | ✓ | — |
disabled | boolean | — | — | — |
size | smmdlg | 'md' | — | — |
children | Snippet | — | ✓ | — |
Forwards <button> attributes via rest props. Common examples: type, disabled, name.
Tabs.Content
| Prop | Type | Default | Required | Bindable |
|---|---|---|---|---|
value | string | — | ✓ | — |
children | Snippet | — | ✓ | — |
Forwards <div> attributes via rest props. Common examples: id, style, role.