Skip to main content
HahlexMillarv0.1.0 Draft
ComponentsDraftWCAG 2.1/2.2 AAZero Gradients@hahlex/millar-ui

Tabs & Segmented

APG-compliant Tabs with full Arrow/Home/End keyboard navigation and Segmented option rail.

Interactive Playground

Live component specimen driven directly by Millar tokens in Light and Dark mode.

Active tab: overview · View: table
Segmented table mode
SurfaceRegister
Portal DocsProduct + Marketing
MCP ServerMachine SSoT
@hahlex/millar-ui
import { Tabs } from "@hahlex/millar-ui";

<Tabs ariaLabel="Component details" activeId={tab} onChange={setTab} items={items} />

Props API

Tabs & Segmented component props
PropTypeDefaultDescription
itemsTabItem[]-Tab definitions with id, label, and panel content.
activeIdstring-Currently selected tab ID.
onChange(id: string) => void-Tab selection handler.
ariaLabelstring-Accessible tablist label.

Usage Guidelines & Agent Guardrails

When to use
  • Component doc views (Playground | Guidelines | Code | Accessibility) and Record Detail facets.
Responsive behavior

Flex-wraps cleanly on compact viewports without horizontal overflow scrollbars.

Anti-Hallucination Guardrails (AI & Human)
  • Do not omit ariaLabel on Tabs.
  • Do not trap Tab key inside tablist (Arrow keys move between tabs; Tab moves to panel).

Accessibility & Keyboard Contract

role='tablist'role='tab' with aria-selected & aria-controlsrole='tabpanel' with aria-labelledby
Keyboard interactions
KeyBehavior
ArrowLeft / ArrowRightMoves focus and activates adjacent tab.
Home / EndJumps to first or last tab.
TabMoves focus from active tab into tabpanel content.