View as Markdown

API reference

@salmonui/navigation/tabs

22 exported symbols: 4 functions, 10 interfaces, 7 types and 1 constant. Each name links its page with the signature, docs and members.

import { … } from '@salmonui/navigation/tabs';

Functions

  • TabOne role="tab" button.
  • TabListThe role="tablist" strip; arrow keys by orientation (mirrored in RTL), Home / End, Delete, Alt+Arrow.
  • TabPanelThe panel of one tab (role="tabpanel", labelled by its tab). The element is always rendered (so aria-controls resolves); its content mounts per Tabs panelMount.
  • TabsAPG Tabs root. Arranges a TabList and its TabPanels in a CSS grid by placement and owns the selection (value / defaultValue / onValueChange).

Interfaces

Types

  • TabIconPlacementWhere a Tab icon sits relative to the label.
  • TabRenderPropsProps passed to a custom tab element (render): spread them all.
  • TabsActivationautomatic: a tab is selected when it receives focus (APG default); manual: Enter / Space selects.
  • TabsOverflowscroll: the list scrolls with scroll buttons; menu: tabs that do not fit move into a "More tabs" menu.
  • TabsPanelMountlazy: a panel mounts on its first selection and stays; active: only the selected panel; eager: every panel, also on the server.
  • TabsPlacementSide of the panels the tab list sits on; start / end are logical and imply a vertical list.
  • TabsSourceInput that caused a change.

Constants