Skip to content
fayeuiStatic / 0.1.0
LLMs
API / Static edition

@fayegram-ai/faye-ui/navigation/tabs

Public exports and dependency-resolved component properties, with usage and rendering guidance.

Import

import { Tabs } from '@fayegram-ai/faye-ui/navigation/tabs';

Usage and behavior guide · API JSON

This entry declares a client boundary. Follow the rendering guide for framework integration.

Public exports

NameKindResolved declaration type
ScrollableTabsListPropstypeScrollableTabsListProps
Tabsvalue{ readonly Root: { (input: Omit<import("@base-ui/react").TabsRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & { variants?: { readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "tone"> | undefined; } | undefined; }): import("react").ReactElement; displayName: string; }; readonly List: { (input: Omit<import("@base-ui/react").TabsListProps, "ref"> & import("react").RefAttributes<HTMLDivElement> & { variants?: { readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs"… (full type in API JSON)

Tabs

Public component; use the linked family guide for complete composition and behavior.

Dependency-resolved declaration properties. Common React/native HTML attributes are omitted from the table; use the full declaration and React/native references. Generic and union restrictions remain authoritative in TypeScript.

Tabs.Root

PropertyRequiredTypeMeaning
classNameNostring | ((state: TabsRootState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
defaultValueNoanyThe default value. Use when the component is not controlled. When the value is null, no Tab will be active.
onValueChangeNo((value: TabsTab.Value, eventDetails: TabsRoot.ChangeEventDetails) => void) | undefinedCallback invoked when new value is being set. The event reason is 'none' for user-initiated changes, such as a click or keyboard navigation; 'initial' for the first automatic selection or fallback in uncontrolled roots when defaultValue is omitted or undefined, including when the implicit initial value is disabled or missing; 'disabled' for automatic fallback when the selected tab becomes disabled in uncontrolled roots; or 'missing' for automatic fallback when the selected tab is removed, or when an explicit defaultValue never matches a mounted tab in uncontrolled roots. For automatic changes, the selected value can be null when no enabled Tab is available as a fallback. Automatic changes cannot be canceled; calling eventDetails.cancel() for 'initial', 'disabled', or 'missing' has no effect.
orientationNoOrientation | undefinedThe component orientation (layout flow direction).
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, TabsRootState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: TabsRootState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
valueNoanyThe value of the currently active Tab. Use when the component is controlled. When the value is null, no Tab will be active.
variantsNo{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "tone"> | undefined; } | undefinedSee the usage contract and declaration.

Tabs.List

PropertyRequiredTypeMeaning
activateOnFocusNoboolean | undefinedWhether to automatically change the active tab on arrow key focus. Otherwise, tabs will be activated using <kbd>Enter</kbd> or <kbd>Space</kbd> key press.
classNameNostring | ((state: TabsListState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
loopFocusNoboolean | undefinedWhether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, TabsListState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: TabsListState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "tone"> | undefined; } | undefinedSee the usage contract and declaration.

Tabs.ScrollableList

PropertyRequiredTypeMeaning
activateOnFocusNoboolean | undefinedWhether to automatically change the active tab on arrow key focus. Otherwise, tabs will be activated using <kbd>Enter</kbd> or <kbd>Space</kbd> key press.
classNameNostring | ((state: TabsListState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
containerClassNameNostring | undefinedSee the usage contract and declaration.
loopFocusNoboolean | undefinedWhether to loop keyboard focus back to the first item when the end of the list is reached while using the arrow keys.
nextLabelNostring | undefinedSee the usage contract and declaration.
previousLabelNostring | undefinedSee the usage contract and declaration.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, TabsListState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: TabsListState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "tone"> | undefined; } | undefinedSee the usage contract and declaration.

Tabs.Tab

PropertyRequiredTypeMeaning
classNameNostring | ((state: TabsTabState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
disabledNoboolean | undefinedWhether the Tab is disabled. If a first Tab on a <Tabs.List> is disabled, it won't initially be selected. Instead, the next enabled Tab will be selected. However, it does not work like this during server-side rendering, as it is not known during pre-rendering which Tabs are disabled. To work around it, ensure that defaultValue or value on <Tabs.Root> is set to an enabled Tab's value.
nativeButtonNoboolean | undefinedWhether the component renders a native <button> element when replacing it via the render prop. Set to false if the rendered element is not a button (for example, <div>).
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, TabsTabState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: TabsTabState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
valueYesanyThe value of the Tab.
variantsNo{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "tone"> | undefined; } | undefinedSee the usage contract and declaration.

Tabs.Panel

PropertyRequiredTypeMeaning
classNameNostring | ((state: TabsPanelState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
keepMountedNoboolean | undefinedWhether to keep the HTML element in the DOM while the panel is hidden.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, TabsPanelState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
styleNoCSSProperties | ((state: TabsPanelState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
valueYesanyThe value of the TabPanel. It will be shown when the Tab with the corresponding value is active.
variantsNo{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "tone"> | undefined; } | undefinedSee the usage contract and declaration.

Tabs.Indicator

PropertyRequiredTypeMeaning
classNameNostring | ((state: TabsIndicatorState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, TabsIndicatorState> | undefinedAllows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.
renderBeforeHydrationNoboolean | undefinedWhether to render itself before React hydrates. This minimizes the time that the indicator isn't visible after server-side rendering.
styleNoCSSProperties | ((state: TabsIndicatorState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
variantsNo{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"tabs", "tone"> | undefined; } | undefinedSee the usage contract and declaration.

Defaults and customization

Descriptor defaults: {"size":"md","tone":"neutral"}. Parts: root, list, tab, panel, indicator, scrollable-list, scroll-button. Explicit instance props take precedence over configured defaults.

Use semantic tokens, public part hooks and customization sheets. Keep visual configuration separate from application state.

State, events and accessibility

For interactive controls, pair a controlled value/open prop with its corresponding change callback; default props initialize uncontrolled state. Keep application validation and submission policy explicit. Name controls with visible labels, name icon-only actions on the button, and preserve focus and dismissal behavior when replacing parts. Use native form names and submit/reset types where supported. See the usage guide for component-specific behavior and live examples.

Declaration authority

Generated from packages/faye-ui/dist/navigation/tabs.d.ts after the semantic package build. Common native/React attributes are intentionally omitted from property tables. Generic overloads, discriminated unions and complete inherited attributes remain authoritative in installed TypeScript declarations. React DOM attributes and Base UI component contracts describe the inherited foundations.