Navigation
Tabs
Sibling views of one subject, each with its own URL.
import { Tab, TabPanel, TabbedView, Tabs } from 'faifo-design'Tabs switches between sibling views of the same subject. Each tab is a link, so the selected view
is part of the URL. TabbedView is the complete region: one stable tab bar and one TabPanel whose
content follows the page scroll.
#When to use
- Use tabs for views that are peers: details, lines, history.
- Do not use tabs for a filter over one view. Periods, statuses and scopes are filters
(
TimeframeFilter,FilterBar). - A tab panel adds no left or right padding; its content owns that.
#Examples
Each example is a specimen of the package catalogue, rendered on the server exactly as shown in its code.
#Navigation and tabs
Faifo Blue marks the active item in both vertical and horizontal navigation.
The active panel owns vertical rhythm and scrolling, without horizontal padding.
Show codeHide code
#Page scrolling tabs
Unbounded page content follows the containing page scroll instead of trapping wheel input.
Use page scrolling for full-page configuration blocks; keep panel scrolling for bounded modals.
Show codeHide code
#API
Generated from the package source. A property without a description has none in the source yet.
#TabComponent
| Property | Description | Type | Default |
|---|---|---|---|
idrequired | – | string | – |
labelrequired | – | string | – |
hrefrequired | – | string | – |
count | A number, or a bounded label such as "10.000+" when the exact total is not counted. | number | string | – |
active | – | boolean | – |
elementId | DOM id used to associate this navigation item with the active panel. | string | – |
controls | Id of the panel this navigation item opens. | string | – |
#TabPanelComponent
Content associated with route-navigation tabs. It owns scrolling and vertical rhythm, but deliberately adds no left or right padding.
| Property | Description | Type | Default |
|---|---|---|---|
id | – | string | – |
labelledBy | – | string | – |
bodyrequired | – | JSXChild | – |
scroll | Page content participates in the containing page's scroll, rather than trapping it. | 'panel' | 'page' | – |
#TabbedViewComponent
A complete tabbed region with one stable navigation bar and one content panel.
| Property | Description | Type | Default |
|---|---|---|---|
idrequired | – | string | – |
labelrequired | – | string | – |
itemsrequired | – | readonly TabItem[] | – |
bodyrequired | – | JSXChild | – |
context | Stable content above the tab bar, such as a record summary or issues. | JSXChild | – |
extension | – | JSXChild | – |
scroll | Use page for unbounded routed content; panel retains bounded modal scrolling. | 'panel' | 'page' | – |
#TabsComponent
| Property | Description | Type | Default |
|---|---|---|---|
id | Stable id used to associate the active tab with a TabPanel. | string | – |
labelrequired | – | string | – |
itemsrequired | – | readonly TabItem[] | – |
extension | – | JSXChild | – |
panelId | Panel controlled by these route-navigation tabs. | string | – |
#Types
#TabItem
| Property | Description | Type | Default |
|---|---|---|---|
idrequired | – | string | – |
labelrequired | – | string | – |
hrefrequired | – | string | – |
count | A number, or a bounded label such as "10.000+" when the exact total is not counted. | number | string | – |
active | – | boolean | – |
#TabPanelProps
The properties of TabPanel, listed above.
#TabProps
The properties of Tab, listed above.
#TabbedViewProps
The properties of TabbedView, listed above.
#TabsProps
The properties of Tabs, listed above.