Navigation Menu
A collection of links and menus for website navigation.
View as MarkdownAnatomy
Import the component and assemble its parts:
import { NavigationMenu } from '@base-ui/react/navigation-menu';
<NavigationMenu.Root>
<NavigationMenu.List>
<NavigationMenu.Item>
<NavigationMenu.Trigger>
<NavigationMenu.Icon />
</NavigationMenu.Trigger>
<NavigationMenu.Content>
<NavigationMenu.Link />
</NavigationMenu.Content>
</NavigationMenu.Item>
</NavigationMenu.List>
<NavigationMenu.Portal>
<NavigationMenu.Backdrop />
<NavigationMenu.Positioner>
<NavigationMenu.Popup>
<NavigationMenu.Arrow />
<NavigationMenu.Viewport />
</NavigationMenu.Popup>
</NavigationMenu.Positioner>
</NavigationMenu.Portal>
</NavigationMenu.Root>Examples
Nested submenus
<NavigationMenu.Root> component can be nested within a higher-level <NavigationMenu.Content> part to create a multi-level navigation menu.
Custom links
The <NavigationMenu.Link> part can be customized to render the link from your framework using the render prop to enable client-side routing.
import NextLink from 'next/link';
import { NavigationMenu } from '@base-ui/react/navigation-menu';
function Link(props: NavigationMenu.Link.Props) {
return (
<NavigationMenu.Link
render={<NextLink href={props.href} />}
{...props}
/>
);
}Large menus
When you have large menu content that doesn’t fit in the viewport in some cases, you usually have two choices:
- Compress the navigation menu content
You can change the layout of the navigation menu to render less content or be more compact by reducing the space it takes up.
If your content is flexible, you can use the max-height property on .Popup to limit the height of the navigation menu to let it compress itself while preventing overflow.
.Content,
.Popup {
max-height: var(--available-height);
}- Make the navigation menu scrollable
.Content,
.Popup {
max-height: var(--available-height);
}
.Content {
overflow-y: auto;
}Native scrollbars are visible while transitioning content, so we recommend using the Scroll Area component instead of native scrollbars to keep them hidden, which also allows the Arrow to be centered correctly.
API reference
Root
Groups all parts of the navigation menu.
Renders a <nav> element at the root, or <div> element when nested.
defaultValueanynull
any- Name
- Description
The uncontrolled value of the item that should be initially selected.
To render a controlled navigation menu, use the
valueprop instead.- Type
any | undefined- Default
null
valueanynull
any- Name
- Description
The 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
defaultValueprop instead.- Type
any | undefined- Default
null
onValueChangefunction—
function- Name
- Description
Callback fired when the value changes.
- Type
| (( value: any, eventDetails: NavigationMenu.Root.ChangeEventDetails, ) => void) | undefined
actionsRef| React.RefObject<NavigationMenu.Root.Actions
| null>—
| React.RefObject<NavigationMenu.Root.Actions
| null>- Name
- Description
A ref to imperative actions.
- Type
React.RefObject<NavigationMenu.Root.Actions | null> | undefined
onOpenChangeCompletefunction—
function- Description
Event handler called after any animations complete when the navigation menu is closed.
- Type
((open: boolean) => void) | undefined
delaynumber50
number- Name
- Description
How long to wait before opening the navigation menu. Specified in milliseconds.
- Type
number | undefined- Default
50
closeDelaynumber50
number- Name
- Description
How long to wait before closing the navigation menu. Specified in milliseconds.
- Type
number | undefined- Default
50
orientation'horizontal' | 'vertical''horizontal'
'horizontal' | 'vertical'- Name
- Description
The orientation of the navigation menu.
- Type
'horizontal' | 'vertical' | undefined- Default
'horizontal'
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | (( state: NavigationMenu.Root.State, ) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: NavigationMenu.Root.State, ) => React.CSSProperties | undefined) | undefined
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: NavigationMenu.Root.State, ) => ReactElement) | undefined
Additional Types
NavigationMenu.Root.Props
Re-Export of Root props as NavigationMenuRootProps
NavigationMenu.Root.State
type NavigationMenuRootState = { open: boolean; nested: boolean };NavigationMenu.Root.Actions
type NavigationMenuRootActions = { unmount: () => void };NavigationMenu.Root.ChangeEventReason
type NavigationMenuRootChangeEventReason =
| 'trigger-press'
| 'trigger-hover'
| 'outside-press'
| 'list-navigation'
| 'focus-out'
| 'escape-key'
| 'link-press'
| 'none';NavigationMenu.Root.ChangeEventDetails
type NavigationMenuRootChangeEventDetails =
| {
reason: 'trigger-press';
event: MouseEvent | PointerEvent | TouchEvent | KeyboardEvent;
cancel: () => void;
allowPropagation: () => void;
isCanceled: boolean;
isPropagationAllowed: boolean;
trigger: Element | undefined;
}
| {
reason: 'trigger-hover';
event: MouseEvent;
cancel: () => void;
allowPropagation: () => void;
isCanceled: boolean;
isPropagationAllowed: boolean;
trigger: Element | undefined;
}
| {
reason: 'outside-press';
event: MouseEvent | PointerEvent | TouchEvent;
cancel: () => void;
allowPropagation: () => void;
isCanceled: boolean;
isPropagationAllowed: boolean;
trigger: Element | undefined;
}
| {
reason: 'list-navigation';
event: KeyboardEvent;
cancel: () => void;
allowPropagation: () => void;
isCanceled: boolean;
isPropagationAllowed: boolean;
trigger: Element | undefined;
}
| {
reason: 'focus-out';
event: KeyboardEvent | FocusEvent;
cancel: () => void;
allowPropagation: () => void;
isCanceled: boolean;
isPropagationAllowed: boolean;
trigger: Element | undefined;
}
| {
reason: 'escape-key';
event: KeyboardEvent;
cancel: () => void;
allowPropagation: () => void;
isCanceled: boolean;
isPropagationAllowed: boolean;
trigger: Element | undefined;
}
| {
reason: 'link-press';
event: MouseEvent | PointerEvent;
cancel: () => void;
allowPropagation: () => void;
isCanceled: boolean;
isPropagationAllowed: boolean;
trigger: Element | undefined;
}
| {
reason: 'none';
event: Event;
cancel: () => void;
allowPropagation: () => void;
isCanceled: boolean;
isPropagationAllowed: boolean;
trigger: Element | undefined;
};List
Contains a list of navigation menu items.
Renders a <ul> element.
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | (( state: NavigationMenu.List.State, ) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: NavigationMenu.List.State, ) => React.CSSProperties | undefined) | undefined
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: NavigationMenu.List.State, ) => ReactElement) | undefined
Additional Types
NavigationMenu.List.Props
Re-Export of List props as NavigationMenuListProps
NavigationMenu.List.State
type NavigationMenuListState = { open: boolean };Item
An individual navigation menu item.
Renders a <li> element.
valueany—
any- Name
- Description
A 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.
- Type
any | undefined
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | (( state: NavigationMenu.Item.State, ) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: NavigationMenu.Item.State, ) => React.CSSProperties | undefined) | undefined
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: NavigationMenu.Item.State, ) => ReactElement) | undefined
Additional Types
NavigationMenu.Item.Props
Re-Export of Item props as NavigationMenuItemProps
NavigationMenu.Item.State
type NavigationMenuItemState = {};Trigger
Opens the navigation menu popup when hovered or clicked, revealing the
associated content.
Renders a <button> element.
nativeButtonbooleantrue
boolean- Name
- Description
Whether the component renders a native
<button>element when replacing it via therenderprop. Set tofalseif the rendered element is not a button (for example,<div>).- Type
boolean | undefined- Default
true
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | (( state: NavigationMenu.Trigger.State, ) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: NavigationMenu.Trigger.State, ) => React.CSSProperties | undefined) | undefined
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: NavigationMenu.Trigger.State, ) => ReactElement) | undefined
data-popup-open
data-pressed
Additional Types
NavigationMenu.Trigger.Props
Re-Export of Trigger props as NavigationMenuTriggerProps
NavigationMenu.Trigger.State
type NavigationMenuTriggerState = { open: boolean };Icon
An icon that indicates that the trigger button opens a menu.
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | (( state: NavigationMenu.Icon.State, ) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: NavigationMenu.Icon.State, ) => React.CSSProperties | undefined) | undefined
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: NavigationMenu.Icon.State, ) => ReactElement) | undefined
Additional Types
NavigationMenu.Icon.Props
Re-Export of Icon props as NavigationMenuIconProps
NavigationMenu.Icon.State
type NavigationMenuIconState = { open: boolean };Content
A container for the content of the navigation menu item that is moved into the popup
when the item is active.
Renders a <div> element.
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | (( state: NavigationMenu.Content.State, ) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: NavigationMenu.Content.State, ) => React.CSSProperties | undefined) | undefined
keepMountedbooleanfalse
boolean- Name
- Description
Whether 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.
- Type
boolean | undefined- Default
false
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: NavigationMenu.Content.State, ) => ReactElement) | undefined
data-open
data-closed
data-activation-direction
data-starting-style
data-ending-style
Additional Types
NavigationMenu.Content.Props
Re-Export of Content props as NavigationMenuContentProps
NavigationMenu.Content.State
type NavigationMenuContentState = {
open: boolean;
transitionStatus: TransitionStatus;
activationDirection: 'left' | 'right' | 'up' | 'down' | null;
};Link
A link in the navigation menu that can be used to navigate to a different page or section.
Renders an <a> element.
closeOnClickbooleanfalse
boolean- Name
- Description
Whether to close the navigation menu when the link is clicked.
- Type
boolean | undefined- Default
false
activebooleanfalse
boolean- Name
- Description
Whether the link is the currently active page.
- Type
boolean | undefined- Default
false
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | (( state: NavigationMenu.Link.State, ) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: NavigationMenu.Link.State, ) => React.CSSProperties | undefined) | undefined
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: NavigationMenu.Link.State, ) => ReactElement) | undefined
data-active
Additional Types
NavigationMenu.Link.Props
Re-Export of Link props as NavigationMenuLinkProps
NavigationMenu.Link.State
type NavigationMenuLinkState = { active: boolean };Backdrop
A backdrop for the navigation menu popup.
Renders a <div> element.
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | (( state: NavigationMenu.Backdrop.State, ) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: NavigationMenu.Backdrop.State, ) => React.CSSProperties | undefined) | undefined
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: NavigationMenu.Backdrop.State, ) => ReactElement) | undefined
data-open
data-closed
data-starting-style
data-ending-style
Additional Types
NavigationMenu.Backdrop.Props
Re-Export of Backdrop props as NavigationMenuBackdropProps
NavigationMenu.Backdrop.State
type NavigationMenuBackdropState = { open: boolean; transitionStatus: TransitionStatus };Portal
A portal element that moves the popup to a different part of the DOM.
By default, the portal element is appended to <body>.
Renders a <div> element.
containerUnion—
Union- Name
- Description
A parent element to render the portal element into.
- Type
| HTMLElement | ShadowRoot | React.RefObject<HTMLElement | ShadowRoot | null> | null | undefined
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | (( state: NavigationMenu.Portal.State, ) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: NavigationMenu.Portal.State, ) => React.CSSProperties | undefined) | undefined
keepMountedbooleanfalse
boolean- Name
- Description
Whether to keep the portal mounted in the DOM while the popup is hidden.
- Type
boolean | undefined- Default
false
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: NavigationMenu.Portal.State, ) => ReactElement) | undefined
Additional Types
NavigationMenu.Portal.Props
Re-Export of Portal props as NavigationMenuPortalProps
NavigationMenu.Portal.State
type NavigationMenuPortalState = {};Positioner
Positions the navigation menu against the currently active trigger.
Renders a <div> element.
disableAnchorTrackingbooleanfalse
boolean- Description
Whether to disable the popup from tracking any layout shift of its positioning anchor.
- Type
boolean | undefined- Default
false
alignAlign'center'
Align- Name
- Description
How to align the popup relative to the specified side.
- Type
'start' | 'center' | 'end' | undefined- Default
'center'
alignOffsetnumber | OffsetFunction0
number | OffsetFunction- Name
- Description
Additional 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
dataobject parameter with the following properties:data.anchor: the dimensions of the anchor element with propertieswidthandheight.data.positioner: the dimensions of the positioner element with propertieswidthandheight.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.
- Type
| number | ((data: { side: | 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'; align: 'start' | 'center' | 'end'; anchor: { width: number; height: number }; positioner: { width: number; height: number }; }) => number) | undefined- Default
0- Example
<Positioner alignOffset={({ side, align, anchor, positioner }) => { return side === 'top' || side === 'bottom' ? anchor.width : anchor.height; }} />
sideSide'bottom'
Side- Name
- Description
Which side of the anchor element to align the popup against. May automatically change to avoid collisions.
- Type
| 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start' | undefined- Default
'bottom'
sideOffsetnumber | OffsetFunction0
number | OffsetFunction- Name
- Description
Distance 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
dataobject parameter with the following properties:data.anchor: the dimensions of the anchor element with propertieswidthandheight.data.positioner: the dimensions of the positioner element with propertieswidthandheight.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.
- Type
| number | ((data: { side: | 'top' | 'bottom' | 'left' | 'right' | 'inline-end' | 'inline-start'; align: 'start' | 'center' | 'end'; anchor: { width: number; height: number }; positioner: { width: number; height: number }; }) => number) | undefined- Default
0- Example
<Positioner sideOffset={({ side, align, anchor, positioner }) => { return side === 'top' || side === 'bottom' ? anchor.height : anchor.width; }} />
arrowPaddingnumber5
number- Name
- Description
Minimum 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.
- Type
number | undefined- Default
5
anchorUnion—
Union- Name
- Description
An element to position the popup against. By default, the popup will be positioned against the trigger.
- Type
| Element | VirtualElement | React.RefObject<Element | null> | (() => Element | VirtualElement | null) | null | undefined
collisionAvoidanceCollisionAvoidance—
CollisionAvoidance- Description
Determines how to handle collisions when positioning the popup.
- Type
CollisionAvoidance | undefined- Example
<Positioner collisionAvoidance={{ side: 'shift', align: 'shift', fallbackAxisSide: 'none', }} />
collisionBoundaryBoundary'clipping-ancestors'
Boundary- Description
An element or a rectangle that delimits the area that the popup is confined to.
- Type
Boundary | undefined- Default
'clipping-ancestors'
collisionPaddingPadding5
Padding- Name
- Description
Additional space to maintain from the edge of the collision boundary.
- Type
Padding | undefined- Default
5
stickybooleanfalse
boolean- Name
- Description
Whether to maintain the popup in the viewport after the anchor element was scrolled out of view.
- Type
boolean | undefined- Default
false
positionMethod'absolute' | 'fixed''absolute'
'absolute' | 'fixed'- Name
- Description
Determines which CSS
positionproperty to use.- Type
'absolute' | 'fixed' | undefined- Default
'absolute'
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | (( state: NavigationMenu.Positioner.State, ) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: NavigationMenu.Positioner.State, ) => React.CSSProperties | undefined) | undefined
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: NavigationMenu.Positioner.State, ) => ReactElement) | undefined
data-open
data-closed
data-anchor-hidden
data-align
data-instant
data-side
--anchor-height
The anchor’s height.
--anchor-width
The anchor’s width.
--available-height
The available height between the trigger and the edge of the viewport.
--available-width
The available width between the trigger and the edge of the viewport.
--positioner-height
The fixed height of the positioner element.
--positioner-width
The fixed width of the positioner element.
--transform-origin
The coordinates that this element is anchored to. Used for animations and transitions.
Additional Types
NavigationMenu.Positioner.Props
Re-Export of Positioner props as NavigationMenuPositionerProps
NavigationMenu.Positioner.State
type NavigationMenuPositionerState = {
open: boolean;
side:
| 'top'
| 'bottom'
| 'left'
| 'right'
| 'inline-end'
| 'inline-start';
align: 'start' | 'center' | 'end';
anchorHidden: boolean;
instant: boolean;
}Popup
A container for the navigation menu contents.
Renders a <nav> element.
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | (( state: NavigationMenu.Popup.State, ) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: NavigationMenu.Popup.State, ) => React.CSSProperties | undefined) | undefined
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: NavigationMenu.Popup.State, ) => ReactElement) | undefined
data-open
data-closed
data-align
data-side
data-starting-style
data-ending-style
--popup-height
The fixed height of the popup element.
--popup-width
The fixed width of the popup element.
Additional Types
NavigationMenu.Popup.Props
Re-Export of Popup props as NavigationMenuPopupProps
NavigationMenu.Popup.State
type NavigationMenuPopupState = {
open: boolean;
transitionStatus: TransitionStatus;
side:
| 'top'
| 'bottom'
| 'left'
| 'right'
| 'inline-end'
| 'inline-start';
align: 'start' | 'center' | 'end';
anchorHidden: boolean;
}Viewport
The clipping viewport of the navigation menu’s current content.
Renders a <div> element.
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | (( state: NavigationMenu.Viewport.State, ) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: NavigationMenu.Viewport.State, ) => React.CSSProperties | undefined) | undefined
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: NavigationMenu.Viewport.State, ) => ReactElement) | undefined
Additional Types
NavigationMenu.Viewport.Props
Re-Export of Viewport props as NavigationMenuViewportProps
NavigationMenu.Viewport.State
type NavigationMenuViewportState = {};Arrow
Displays an element pointing toward the navigation menu’s current anchor.
Renders a <div> element.
classNamestring | function—
string | function- Name
- Description
CSS class applied to the element, or a function that returns a class based on the component’s state.
- Type
| string | (( state: NavigationMenu.Arrow.State, ) => string | undefined) | undefined
styleReact.CSSProperties | function—
React.CSSProperties | function- Name
- Type
| React.CSSProperties | (( state: NavigationMenu.Arrow.State, ) => React.CSSProperties | undefined) | undefined
renderReactElement | function—
ReactElement | function- Name
- Description
Allows you to replace the component’s HTML element with a different tag, or compose it with another component.
Accepts a
ReactElementor a function that returns the element to render.- Type
| ReactElement | (( props: HTMLProps, state: NavigationMenu.Arrow.State, ) => ReactElement) | undefined
data-open
data-closed
data-uncentered
data-align
data-side
Additional Types
NavigationMenu.Arrow.Props
Re-Export of Arrow props as NavigationMenuArrowProps
NavigationMenu.Arrow.State
type NavigationMenuArrowState = {
open: boolean;
side:
| 'top'
| 'bottom'
| 'left'
| 'right'
| 'inline-end'
| 'inline-start';
align: 'start' | 'center' | 'end';
uncentered: boolean;
}