Switch between related content sections.
packages/og-tabs.css): cell renders tabs as joined bordered cells (icon-friendly, 2px accent bar under the active cell); underline-animated adds a sliding accent indicator (an absolutely-positioned bar that transitions width/translate to the active tab — needs the small positioning script from packages/og-tabs.html); segmented is the pill pattern refined: muted container, active tab raised on a white card with a soft shadow. All three respect prefers-reduced-motion.
| Name | Type | Default | Description |
|---|---|---|---|
items | array | — | Tab items: {label, content} |
defaultIndex | number | 0 | Initially active tab |
variant | string | underline | underline | pill | header-nav-dark (as <nav> of links) | cell | underline-animated | segmented |
onChange | function | — | Callback when active tab changes |
className | string | "" | Additional CSS classes |
| Variant | Proven in | Live at | Date |
|---|---|---|---|
header-nav-dark | OG-030-Ioioio-Design-Review (client report hub) | oganiko.com/digital/clients/ioioio/ | 2026-07-04 |
cell | 21st.dev — @k3menn "Tabs in cell for navigation" (external assimilation) | 21st.dev | 2026-08-08 |
underline-animated | 21st.dev — @coss.com "Tabs" (external assimilation) | 21st.dev | 2026-08-08 |
segmented | 21st.dev — @originui "Tabs" (external assimilation) | 21st.dev | 2026-08-08 |
components/Tabs.jsx
▾
<Tabs
items={[
{ label: 'Colour Stops', content: <ColourStopsPanel /> },
{ label: 'Opacity', content: <OpacityPanel /> },
{ label: 'Animation', content: <AnimationPanel /> },
]}
defaultIndex={0}
variant="underline"
/>