⚡ ComponentForge

Tabs

Navigation

ARIA tablist with automatic (default) or manual activation, roving tabIndex and disabled-tab awareness. Panels stay mounted (hidden) so scroll position and form state survive tab switches.

import { Tabs } from "@componentforge/react";

Examples

Automatic activation with disabled tab

Panels stay mounted (hidden), so scroll position and form state survive switching.

Accessibility

  • tablist/tab/tabpanel roles wired with aria-controls and aria-labelledby id pairs.
  • Roving tabindex: selected tab owns Tab-stop; arrows move focus, Home/End jump ends, disabled tabs are skipped.
  • Manual mode defers activation until Enter/Space while still moving focus.

Keyboard interactions

KeyAction
← / → (or ↑ / ↓)Move between tabs; activates immediately in automatic mode.
Home / EndFirst / last enabled tab.
Enter / SpaceActivate in manual mode.

API reference

Selected props — every component also spreads native HTML attributes.

PropTypeDefaultDescription
value / defaultValue / onValueChangestringSelection contract.
activation"automatic" | "manual""automatic"Activation policy.
Tab.disabledbooleanfalseExcluded from arrow traversal.