Skip to main content
Mantı UI logoMantı UIv0.12.1
Studio

NavigationMenu

Pass top-level items as { value, label, links }. Links use { href, label, description? }.

import { NavigationMenu } from '@manti-ui/react';
import type { NavigationMenuItem } from '@manti-ui/react';

const items: NavigationMenuItem[] = [
  {
    value: 'products',
    label: 'Products',
    links: [
      { href: '#components', label: 'Components', description: '40+ adapters' },
      { href: '#tokens', label: 'Tokens', description: 'The design contract' },
    ],
  },
  {
    value: 'resources',
    label: 'Resources',
    links: [
      { href: '#docs', label: 'Docs', description: 'Guides & API' },
      { href: '#blog', label: 'Blog', description: 'Updates & notes' },
    ],
  },
];

export default function NavigationMenuBasic() {
  return <NavigationMenu items={items} />;
}

API

PropTypeDefaultDescription
itemsNavigationMenuItem[]The top-level menus. Each is `{ value, label, links }` where each link is `{ href, label, description? }`.
valuestringControlled open menu value.
defaultValuestringInitial open menu for uncontrolled usage.
onValueChange(value: string) => voidCalled whenever the open menu changes.

Styling

Anatomy

PartSelectorDescription
root[data-scope="navigation-menu"][data-part="root"]The `<nav>` wrapper.
list[data-scope="navigation-menu"][data-part="list"]The row of top-level triggers.
trigger[data-scope="navigation-menu"][data-part="trigger"]A top-level menu button that opens its dropdown.
content[data-scope="navigation-menu"][data-part="content"]The dropdown panel holding the links for one menu.
link[data-scope="navigation-menu"][data-part="link"]A single navigation link inside a dropdown.
indicator[data-scope="navigation-menu"][data-part="indicator"]The sliding indicator and arrow that point at the open menu.

Tokens

TokenControls
--manti-navigation-menu-content-min-widthcontent min width

Last updated

Built end-to-end with Manti UI components and design tokens. Manti UI is a framework-agnostic design system on Zag.js.

GitHub