XiodUI
HomeDocs
OverviewComponentsThemes & ColorsChangelog
⌘ K

Components

  • Accordion
  • Agent Steps
    New
  • Alert
  • Alert Dialog
  • Aspect Ratio
    New
  • Autocomplete
  • Avatar
  • Badge
  • Breadcrumb
  • Button
    Updated
  • Button Group
    New
  • Button Split
    New
  • Calendar
    New
  • Card
  • Carousel
    New
  • Checkbox
  • Circular Progress
    New
  • Collapsible
  • Color Picker
    New
  • Combobox
  • Command
  • Context Menu
    New
  • Copy To Clipboard
    New
  • Corner Badge
    New
  • Dashboard Grid
    New
  • Date Picker
    New
  • Dialog
  • Dot Matrix
    New
  • Draggable
    New
  • Drawer
    New
  • Empty
  • Field
  • Fieldset
  • File Upload
    New
  • Form
  • Frame
  • Gauge
    New
  • Grid
    New
  • Group
  • Input
  • Input Group
  • Input OTP
    New
  • Input Payment
    New
  • Input Phone
    New
  • Input Sensitive
    New
  • Kbd
  • Kinetic Click
    New
  • Label
  • List Box
    New
  • Loader
  • Marker
    New
  • Menu
  • Menubar
  • Message
    New
  • Meter
  • Morphic Toast
    New
  • Navigation Menu
  • Number Field
  • Option Picker
    New
  • Orb
    New
  • Pagination
  • Popover
  • Preview Card
  • Progress
  • Radio
  • Resizable
    New
  • Ruler Picker
    New
  • Scroll Area
  • Scroll Bar
    New
  • Select
  • Separator
  • Sidebar
  • Skeleton
  • Slider
    Updated
  • Sortable
    New
  • Switch
    Updated
  • Table
  • Tabs
  • Text
    New
  • Textarea
  • Timeline
    New
  • Toast
  • Toggle
  • Toggle Group
  • Toolbar
  • Tooltip
    Updated
  • Waveform
    New
  • Wheel Picker
    New
/
/

Loading...

Preview Skeleton

Installation Skeleton

Usage Skeleton

API Reference Skeleton

Sponsors

Support the development of XiodUI and help us build the best component library on Earth.

+++
Sponsor on GitHub

Navigation Menu

Previous: Morphic ToastNext: Number Field

A collection of links for navigating websites.

Preview

Loading Preview...

Installation

bun add xiod-ui

Usage

Imports

1import {2  NavigationMenu,3  NavigationMenuContent,4  NavigationMenuIcon,5  NavigationMenuIndicator,6  NavigationMenuItem,7  NavigationMenuLink,8  NavigationMenuList,9  NavigationMenuPopup,10  NavigationMenuPortal,11  NavigationMenuTrigger,12  NavigationMenuViewport13} from "xiod-ui/navigation-menu";

Anatomy

1<NavigationMenu>2  <NavigationMenuTrigger />3  <NavigationMenuContent>4    <NavigationMenuList>5      <NavigationMenuIndicator />6      <NavigationMenuItem />7    </NavigationMenuList>8    <NavigationMenuIcon />9    <NavigationMenuLink />10    <NavigationMenuPopup />11    <NavigationMenuPortal />12    <NavigationMenuViewport />13  </NavigationMenuContent>14</NavigationMenu>

API Reference

Detailed documentation of properties and options.

NavigationMenu

PropTypeDefaultDescription
actionsRef
RefObject<NavigationMenuRootActions
|null>
|undefined
-A ref to imperative actions.
onOpenChangeComplete
((open: boolean) => void)
|undefined
-Event handler called after any animations complete when the navigation menu is closed.
value
any
nullThe 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.
defaultValue
any
nullThe uncontrolled value of the item that should be initially selected. To render a controlled navigation menu, use the `value` prop instead.
onValueChange
((value: any, eventDetails: NavigationMenuRootChangeEventDetails) => void)
|undefined
-Callback fired when the value changes.
delay
number
|undefined
50How long to wait before opening the navigation popup. Specified in milliseconds.
closeDelay
number
|undefined
50How long to wait before closing the navigation popup. Specified in milliseconds.
orientation
"horizontal"
|"vertical"
|undefined
'horizontal'The orientation of the navigation menu.
className
string
|((state: NavigationMenuRootState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, NavigationMenuRootState>
|undefined
-Allows 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.
style
CSSProperties
|((state: NavigationMenuRootState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.

NavigationMenuContent

PropTypeDefaultDescription
keepMounted
boolean
|undefined
falseWhether 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.
className
string
|((state: NavigationMenuContentState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, NavigationMenuContentState>
|undefined
-Allows 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.
style
CSSProperties
|((state: NavigationMenuContentState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.

NavigationMenuIcon

PropTypeDefaultDescription
className
string
|((state: NavigationMenuIconState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, NavigationMenuIconState>
|undefined
-Allows 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.
style
CSSProperties
|((state: NavigationMenuIconState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.

NavigationMenuItem

PropTypeDefaultDescription
value
any
-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.
className
string
|((state: NavigationMenuItemState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, NavigationMenuItemState>
|undefined
-Allows 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.
style
CSSProperties
|((state: NavigationMenuItemState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.

NavigationMenuLink

PropTypeDefaultDescription
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, {}>
|undefined
-Allows 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.
active
boolean
|undefined
-

NavigationMenuList

PropTypeDefaultDescription
className
string
|((state: NavigationMenuListState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, NavigationMenuListState>
|undefined
-Allows 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.
style
CSSProperties
|((state: NavigationMenuListState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.

NavigationMenuPopup

PropTypeDefaultDescription
className
string
|((state: NavigationMenuPopupState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, NavigationMenuPopupState>
|undefined
-Allows 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.
style
CSSProperties
|((state: NavigationMenuPopupState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.
align
Align
|undefined
center
sideOffset
number
|OffsetFunction
|undefined
10
alignOffset
number
|OffsetFunction
|undefined
-
side
Side
|undefined
bottom
anchor
Element
|VirtualElement
|RefObject<Element
|null>
|(() => Element
|VirtualElement
|null)
|null
|undefined
-
hideArrow
boolean
|undefined
false

NavigationMenuPortal

PropTypeDefaultDescription
style
CSSProperties
|((state: NavigationMenuPortalState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.
className
string
|((state: NavigationMenuPortalState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, NavigationMenuPortalState>
|undefined
-Allows 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.
keepMounted
boolean
|undefined
falseWhether to keep the portal mounted in the DOM while the popup is hidden.
container
HTMLElement
|ShadowRoot
|RefObject<HTMLElement
|ShadowRoot
|null>
|null
|undefined
-A parent element to render the portal element into.

NavigationMenuTrigger

PropTypeDefaultDescription
disabled
boolean
|undefined
falseWhether the component should ignore user interaction.
nativeButton
boolean
|undefined
trueWhether 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>`).
className
string
|((state: NavigationMenuTriggerState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, NavigationMenuTriggerState>
|undefined
-Allows 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.
style
CSSProperties
|((state: NavigationMenuTriggerState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.

NavigationMenuViewport

PropTypeDefaultDescription
className
string
|((state: NavigationMenuViewportState) => string
|undefined)
|undefined
-CSS class applied to the element, or a function that returns a class based on the component's state.
render
ReactElement<unknown, string
|JSXElementConstructor<any>>
|ComponentRenderFn<HTMLProps, NavigationMenuViewportState>
|undefined
-Allows 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.
style
CSSProperties
|((state: NavigationMenuViewportState) => CSSProperties
|undefined)
|undefined
-Style applied to the element, or a function that returns a style object based on the component's state.
Morphic ToastNumber Field