Skip to content
  • InstallationGuideCLI, shadcn, npm, React and Next.js
  • ThemingGuideThe theme contract, every token, writing a theme
  • ButtonActions & displayActions. Default, primary, ghost and danger, in three sizes, plus a square icon button.
  • BadgeActions & displayShort status labels and tags, in status colours or the theme’s six palette colours.
  • AvatarActions & displayA photo or initials in a palette colour, in three sizes, and a stacked group.
  • CardActions & displayThe raised surface for grouped content, with header, body and footer slots and six palette tints.
  • SurfaceActions & displayThe three materials every theme defines: raised, inset and overlay. Build your own components on them.
  • InputFormsText fields and textareas with a visible label, hint and invalid state.
  • SelectFormsA styled native <select>: keyboard, mobile pickers and screen readers work for free.
  • Checkbox and radioFormsNative checkboxes and radios, restyled, including the indeterminate state and radio groups.
  • SwitchFormsAn on/off setting that applies at once: a checkbox with role="switch".
  • SliderFormsA native range input whose filled track follows the thumb.
  • Dialog and drawerOverlaysModal <dialog>: the browser traps focus, handles Esc and returns focus to the trigger. Drawers slide from an edge.
  • Popover and menuOverlaysNative popover API (light dismiss, Esc, top layer), placed next to its trigger. A menu is a popover with role="menu".
  • TooltipOverlaysA CSS-only label on hover and keyboard focus. Esc hides it.
  • ToastFeedbackNotifications in one polite live region; errors use role="alert". They pause while hovered or focused.
  • AlertFeedbackInline messages in four tones.
  • ProgressFeedbackA native <progress>; leave out value for an indeterminate bar.
  • SkeletonFeedbackPlaceholders while content loads.
  • TabsNavigation & dataWAI-ARIA tabs with automatic activation and roving focus.
  • AccordionNavigation & dataNative <details>: works without JavaScript. The same name keeps one item open.
  • TableNavigation & dataData tables that scroll sideways on small screens; compact density tightens rows.
  • PaginationNavigation & dataPage links in a labelled nav with the current page marked.

Navigation & data

Tabs

WAI-ARIA tabs with automatic activation and roving focus.

Tabs

Name, photo and timezone.
html
<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

tsx
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.

Glassmorphism 2.0

Name, photo and timezone.

Liquid glass

Name, photo and timezone.

Neumorphism / Soft UI

Name, photo and timezone.

Claymorphism

Name, photo and timezone.

Neubrutalism

Name, photo and timezone.

Aurora / mesh gradient

Name, photo and timezone.

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

bash
npx @og-ui/cli add tabs
npx @og-ui/cli add tabs --react   # with the React component