Getting startedComponentsDesign tokensThemingTheme synthesizerFrameworksAccessibilityUtilitiesServer renderingBrowser supportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting startedFrameworksServer renderingDesign tokensThemingTheme synthesizerTypographyUtilitiesAll componentsAccessibilityBrowser supportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Navigation Menu

Horizontal navigation bar whose top-level items open dropdowns of links on hover or click. Each link can carry a one-line description.

ComponentsNavigation Menu
navigationhybrid
<arc-navigation-menu>

Overview

Navigation Menu is a horizontal nav bar for a site header. Each top-level `<arc-nav-item>` is either a link or a parent whose nested items open in a dropdown on hover, or on click for touch screens and keyboards. Use it when a site has several sections (products, solutions, resources) and listing every link in the header would crowd it. A dropdown item can have a `description`, shown as a line of text under its label. With descriptions it works as a mega-menu, and without them it's a plain list of links. Triggers are buttons, so Enter or Space opens a dropdown, and Escape closes it and returns focus to its trigger. Triggers carry `aria-expanded` and `aria-haspopup`, and dropdowns use `role="menu"` and `role="menuitem"`. Following a link fires a cancelable `arc-navigate` event with the `href`, so a client-side router can call `preventDefault()` and handle the route itself. When its container is 480px wide or narrower, the bar hides. The same items then open in a modal panel when a Top Bar with `mobile-menu="nav"` fires `arc-mobile-menu-toggle` from its menu button.

Guidelines

Do

  • Keep top-level items to five or fewer
  • Add descriptions to dropdown items when a label needs context
  • Make single-destination items like "Pricing" plain links with no dropdown
  • Set `active` on the NavItem that matches the current route
  • Put it inside a Top Bar or a sticky header

Don't

  • Don't nest NavItems more than one level deep. A dropdown renders only its direct children
  • Don't use it alongside a Sidebar in the same view. Pick one navigation pattern
  • Don't use it for links within a page. Use ScrollSpy or Tabs
  • Don't leave out `href` on leaf items
  • Don't put more than six or seven items in one dropdown. Split them into more top-level categories

Features

  • Dropdowns fade and slide in
  • A dropdown waits 150ms before closing when the pointer leaves, so moving from the trigger to the panel doesn't close it
  • `active` on a NavItem gives it a tinted background, border and glow

Preview

Products Analytics Automation Security Solutions Engineering teams Platform teams Enterprise Pricing Docs Blog Changelog

Usage

Its events and state need JavaScript, so use the Web Component or a framework wrapper for those.

<script type="module" src="@arclux/arc-ui"></script>

<arc-navigation-menu label="Example menu">
  <arc-nav-item>Products
    <arc-nav-item href="#" description="Real-time dashboards and metrics">Analytics</arc-nav-item>
    <arc-nav-item href="#" description="CI/CD pipelines and deployment">Automation</arc-nav-item>
    <arc-nav-item href="#" description="Role-based access and SSO">Security</arc-nav-item>
  </arc-nav-item>
  <arc-nav-item>Solutions
    <arc-nav-item href="#" description="Shared tooling for product teams">Engineering teams</arc-nav-item>
    <arc-nav-item href="#" description="Infrastructure and monitoring">Platform teams</arc-nav-item>
    <arc-nav-item href="#" description="Support plans and procurement">Enterprise</arc-nav-item>
  </arc-nav-item>
  <arc-nav-item href="#" variant="primary">Pricing</arc-nav-item>
  <arc-nav-item href="#">Docs</arc-nav-item>
  <arc-nav-item href="#" variant="muted">Blog</arc-nav-item>
  <arc-nav-item href="#" variant="muted" active>Changelog</arc-nav-item>
</arc-navigation-menu>

API

labelstring'Navigation menu'

Events

arc-mobile-menu-toggledetail:{ value: boolean }
Fired when the mobile hamburger button is clicked. Bubbles composed from the host, so listening on the element or on document both work.
arc-navigate
Fired when a navigation item is selected

NavItem

<arc-nav-item>

One entry in a Navigation Menu. At the top level, a NavItem with NavItem children becomes a dropdown trigger, and one without children is a link.

resolvedHref
Destination, preferring the explicit attribute over an anchor child. Authoring <arc-nav-item><a href="/docs">Docs</a></arc-nav-item> makes the pre-upgrade markup a working link list, which is what no-JS visitors and anyone on a slow connection actually see; arc-navigation-menu hides this light DOM only once it has upgraded and re-rendered it into shadow DOM.
label
subItems
Nested arc-nav-item children for dropdown menus.
hasChildren
hrefstring''
Destination URL for the nav item. Required for leaf items that navigate. Omit on parent items that serve only as dropdown triggers.
descriptionstring''
Secondary text displayed below the item label inside a dropdown. Use this to add context like "Real-time dashboards and metrics" so users can scan the mega-menu without clicking through.
activebooleanfalse
Highlights the item with an accent-colored bottom border to indicate the current route. Set this on the top-level NavItem that corresponds to the active page.
variant'default' | 'primary' | 'muted''default'
Visual style variant. default shows a subtle border and muted text with accent glow on active. primary uses accent-colored text and border in the resting state with a stronger glow on hover/active. muted renders a subdued style with no border and lighter text, ideal for secondary links like "Blog" or "Changelog".

See also