Navigation & data
Tabs
WAI-ARIA tabs with automatic activation and roving focus.
Tabs
Name, photo and timezone.
Plan, payment method and invoices.
Invite people and manage roles.
<div class="og-tabs" data-og-tabs style="width: 100%; max-width: 28rem">
<div class="og-tabs__list" role="tablist" aria-label="Settings">
<button class="og-tabs__tab" role="tab" aria-selected="true" aria-controls="tabs-1" id="tabs-1t">Profile</button>
<button class="og-tabs__tab" role="tab" aria-selected="false" aria-controls="tabs-2" id="tabs-2t" tabindex="-1">Billing</button>
<button class="og-tabs__tab" role="tab" aria-selected="false" aria-controls="tabs-3" id="tabs-3t" tabindex="-1">Team</button>
</div>
<div class="og-tabs__panel" role="tabpanel" id="tabs-1" aria-labelledby="tabs-1t" tabindex="0">Name, photo and timezone.</div>
<div class="og-tabs__panel" role="tabpanel" id="tabs-2" aria-labelledby="tabs-2t" tabindex="0" hidden>Plan, payment method and invoices.</div>
<div class="og-tabs__panel" role="tabpanel" id="tabs-3" aria-labelledby="tabs-3t" tabindex="0" hidden>Invite people and manage roles.</div>
</div>React
import { Tabs } from '@og-ui/react';
<Tabs
label="Settings"
items={[
{ value: 'profile', label: 'Profile', content: 'Name, photo and timezone.' },
{ value: 'billing', label: 'Billing', content: 'Plan and invoices.' },
]}
onValueChange={(v) => console.log(v)}
/>In every theme
Clean SaaS
Name, photo and timezone.
Plan, payment method and invoices.
Invite people and manage roles.
Glassmorphism 2.0
Name, photo and timezone.
Plan, payment method and invoices.
Invite people and manage roles.
Liquid glass
Name, photo and timezone.
Plan, payment method and invoices.
Invite people and manage roles.
Neumorphism / Soft UI
Name, photo and timezone.
Plan, payment method and invoices.
Invite people and manage roles.
Claymorphism
Name, photo and timezone.
Plan, payment method and invoices.
Invite people and manage roles.
Neubrutalism
Name, photo and timezone.
Plan, payment method and invoices.
Invite people and manage roles.
Aurora / mesh gradient
Name, photo and timezone.
Plan, payment method and invoices.
Invite people and manage roles.
Keyboard and screen readers
- The tab list is one Tab stop (only the selected tab has tabindex="0").
- Left/Right move between tabs and select them (Up/Down with aria-orientation="vertical"); they wrap.
- Home/End go to the first/last tab.
- Tab moves from the tab list into the panel.
Install
npx @og-ui/cli add tabs
npx @og-ui/cli add tabs --react # with the React component