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
TabCloseEventTab onClose: the close button was pressed or Delete was pressed on the focused tab.TabListPropsTabPanelPropsTabPropsTabsBeforeReorderEventonBeforeReorder: preventDefault() cancels the move.TabsBeforeValueChangeEventonBeforeValueChange: preventDefault() keeps the current tab.TabsLocaleTextStatic texts (TABS_DEFAULT_LOCALE_TEXT).TabsPropsTabsReorderEventonReorder: the application moves the tab from fromIndex to toIndex (indices among the Tab elements).TabsValueChangeEventSecond argument of onValueChange (frozen in development).
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.