Skip to content
fayeuiStatic / 0.1.0
LLMs
API / Static edition

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

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

Import

import { NavigationMenu } from '@fayegram-ai/faye-ui/navigation/navigation-menu';

Usage and behavior guide · API JSON

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

Public exports

NameKindResolved declaration type
NavigationMenuvalue{ readonly Root: { (input: Base.Root.Props<unknown> & { variants?: { readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "tone"> | undefined; } | undefined; }): import("react").ReactElement; displayName: string; }; readonly List: { (input: Omit<import("@base-ui/react").NavigationMenuListProps, "ref"> & import("react").RefAttributes<HTMLUListElement> & { variants?: { readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "tone"> | undefin… (full type in API JSON)

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.

PropertyRequiredTypeMeaning
actionsRefNoRefObject<NavigationMenuRootActions | null> | undefinedA ref to imperative actions.
classNameNostring | ((state: NavigationMenuRootState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
closeDelayNonumber | undefinedHow long to wait before closing the navigation popup. Specified in milliseconds.
defaultValueNounknownThe uncontrolled value of the item that should be initially selected. To render a controlled navigation menu, use the value prop instead.
delayNonumber | undefinedHow long to wait before opening the navigation popup. Specified in milliseconds.
onOpenChangeCompleteNo((open: boolean) => void) | undefinedEvent handler called after any animations complete when the navigation menu is closed.
onValueChangeNo((value: unknown, eventDetails: Base.Root.ChangeEventDetails) => void) | undefinedCallback fired when the value changes.
orientationNo"horizontal" | "vertical" | undefinedThe orientation of the navigation menu.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, NavigationMenuRootState> | 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: NavigationMenuRootState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
valueNounknownThe controlled value of the navigation menu item that should be currently open. When non-nullish, the menu will be open. When nullish, the menu will be closed. To render an uncontrolled navigation menu, use the defaultValue prop instead.
variantsNo{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "tone"> | undefined; } | undefinedSee the usage contract and declaration.
PropertyRequiredTypeMeaning
classNameNostring | ((state: NavigationMenuListState) => 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, NavigationMenuListState> | 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: NavigationMenuListState) => 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<"navigation-menu", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "tone"> | undefined; } | undefinedSee the usage contract and declaration.
PropertyRequiredTypeMeaning
classNameNostring | ((state: NavigationMenuItemState) => 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, NavigationMenuItemState> | 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: NavigationMenuItemState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.
valueNoanyA unique value that identifies this navigation menu item. If no value is provided, a unique ID will be generated automatically. Use when controlling the navigation menu programmatically.
variantsNo{ readonly size?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "tone"> | undefined; } | undefinedSee the usage contract and declaration.
PropertyRequiredTypeMeaning
classNameNostring | ((state: NavigationMenuTriggerState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
disabledNoboolean | undefinedWhether the component should ignore user interaction.
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, NavigationMenuTriggerState> | 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: NavigationMenuTriggerState) => 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<"navigation-menu", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "tone"> | undefined; } | undefinedSee the usage contract and declaration.
PropertyRequiredTypeMeaning
classNameNostring | ((state: NavigationMenuContentState) => 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 content mounted in the DOM while the popup is closed. Ensures the content is present during server-side rendering for web crawlers.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, NavigationMenuContentState> | 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: NavigationMenuContentState) => 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<"navigation-menu", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "tone"> | undefined; } | undefinedSee the usage contract and declaration.
PropertyRequiredTypeMeaning
activeNoboolean | undefinedWhether the link is the currently active page.
classNameNostring | ((state: NavigationMenuLinkState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
closeOnClickNoboolean | undefinedWhether to close the navigation menu when the link is clicked.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, NavigationMenuLinkState> | 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: NavigationMenuLinkState) => 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<"navigation-menu", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "tone"> | undefined; } | undefinedSee the usage contract and declaration.
PropertyRequiredTypeMeaning
alignNoAlign | undefinedHow to align the popup relative to the specified side.
alignOffsetNonumber | OffsetFunction | undefinedAdditional offset along the alignment axis in pixels. Also accepts a function that returns the offset to read the dimensions of the anchor and positioner elements, along with its side and alignment. The function takes a data object parameter with the following properties: - data.anchor: the dimensions of the anchor element with properties width and height. - data.positioner: the dimensions of the positioner element with properties width and height. - data.side: which side of the anchor element the positioner is aligned against. - data.align: how the positioner is aligned relative to the specified side.
anchorNoElement | VirtualElement | RefObject<Element | null> | (() => Element | VirtualElement | null) | null | undefinedAn element to position the popup against. By default, the popup will be positioned against the trigger.
arrowPaddingNonumber | undefinedMinimum distance to maintain between the arrow and the edges of the popup. Use it to prevent the arrow element from hanging out of the rounded corners of a popup.
classNameNostring | ((state: NavigationMenuPositionerState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
collisionAvoidanceNoCollisionAvoidance | undefinedDetermines how to handle collisions when positioning the popup. side controls overflow on the preferred placement axis (top/bottom or left/right): - 'flip': keep the requested side when it fits; otherwise try the opposite side (top and bottom, or left and right). - 'shift': never change side; keep the requested side and move the popup within the clipping boundary so it stays visible. - 'none': do not correct side-axis overflow. align controls overflow on the alignment axis (start/center/end): - 'flip': keep side, but swap start and end when the requested alignment overflows. - 'shift': keep side and requested alignment, then nudge the popup along the alignment axis to fit. - 'none': do not correct alignment-axis overflow. fallbackAxisSide controls fallback behavior on the perpendicular axis when the preferred axis cannot fit: - 'start': allow perpendicular fallback and try the logical start side first (top before bottom, or left before right in LTR). - 'end': allow perpendicular fallback and try the logical end side first (bottom before top, or right before left in LTR). - 'none': do not fallback to the perpendicular axis. When side is 'shift', explicitly setting align only supports 'shift' or 'none'. If align is omitted, it defaults to 'flip'.
collisionBoundaryNoBoundary | undefinedAn element or a rectangle that delimits the area that the popup is confined to.
collisionPaddingNoPadding | undefinedAdditional space to maintain from the edge of the collision boundary.
disableAnchorTrackingNoboolean | undefinedWhether to disable the popup from tracking any layout shift of its positioning anchor.
positionMethodNo"absolute" | "fixed" | undefinedDetermines which CSS position property to use.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, NavigationMenuPositionerState> | 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.
sideNoSide | undefinedWhich side of the anchor element to align the popup against. May automatically change to avoid collisions.
sideOffsetNonumber | OffsetFunction | undefinedDistance between the anchor and the popup in pixels. Also accepts a function that returns the distance to read the dimensions of the anchor and positioner elements, along with its side and alignment. The function takes a data object parameter with the following properties: - data.anchor: the dimensions of the anchor element with properties width and height. - data.positioner: the dimensions of the positioner element with properties width and height. - data.side: which side of the anchor element the positioner is aligned against. - data.align: how the positioner is aligned relative to the specified side.
stickyNoboolean | undefinedWhether to maintain the popup in the viewport after the anchor element was scrolled out of view.
styleNoCSSProperties | ((state: NavigationMenuPositionerState) => 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<"navigation-menu", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "tone"> | undefined; } | undefinedSee the usage contract and declaration.
PropertyRequiredTypeMeaning
classNameNostring | ((state: NavigationMenuPopupState) => 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, NavigationMenuPopupState> | 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: NavigationMenuPopupState) => 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<"navigation-menu", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "tone"> | undefined; } | undefinedSee the usage contract and declaration.
PropertyRequiredTypeMeaning
classNameNostring | ((state: NavigationMenuViewportState) => 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, NavigationMenuViewportState> | 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: NavigationMenuViewportState) => 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<"navigation-menu", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "tone"> | undefined; } | undefinedSee the usage contract and declaration.
PropertyRequiredTypeMeaning
classNameNostring | ((state: NavigationMenuArrowState) => 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, NavigationMenuArrowState> | 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: NavigationMenuArrowState) => 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<"navigation-menu", "size"> | undefined; readonly tone?: import("@fayegram-ai/faye-ui/contracts/visual-variants").VisualVariant<"navigation-menu", "tone"> | undefined; } | undefinedSee the usage contract and declaration.
PropertyRequiredTypeMeaning
classNameNostring | ((state: NavigationMenuPortalState) => string | undefined) | undefinedCSS class applied to the element, or a function that returns a class based on the component's state.
containerNoHTMLElement | ShadowRoot | RefObject<HTMLElement | ShadowRoot | null> | null | undefinedA parent element to render the portal element into.
keepMountedNoboolean | undefinedWhether to keep the portal mounted in the DOM while the popup is hidden.
renderNoReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, NavigationMenuPortalState> | 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: NavigationMenuPortalState) => React.CSSProperties | undefined) | undefinedStyle applied to the element, or a function that returns a style object based on the component's state.

Defaults and customization

Descriptor defaults: {"size":"md","tone":"neutral"}. Parts: root, list, item, trigger, content, link, positioner, popup, viewport, arrow. 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/navigation-menu.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.