navigation · @awesome-ds/react
Tabs
Tablist / tab / tabpanel pattern.
State matrix
selected
Anatomy
- tablist
- tabs
- active tabpanel
Keyboard contract
Left/Right arrows move tabs, Home/End jump, and selection follows focus.
Screen-reader contract
tab, aria-selected, and labelled tabpanel relationships are complete.
Content rules
- Use short parallel tab labels.
- Keep related content at one hierarchy level.
Public API
| Prop | Type | required | Description |
|---|---|---|---|
items | TabItem[] | required | Tabs and panels |
defaultValue | string | — | Initially selected item |
ariaLabel | string | — | Localized tab-list name |
Adaptation contracts
- RTL
- Follow document direction for directional keys and visuals while preserving semantic order.
- High contrast
- Current, selected, expanded, and focus states remain distinct without fill alone.
- Reduced motion
- Move selection and disclosure state without animated travel.
Verification IDs
Live
Live
One
Two
Panel one
Copyable example
import { Tabs } from "@awesome-ds/react";
<Tabs items={[{value:'a',label:'A',content:'A'}]} />