Skip to main content

MCDS


Popup Nav

A navigation component that displays a popup menu with grouped links.

Code

<PopupNav
  label="Products & Services"
  groups={[
    {
      id: "products",
      title: "Products",
      links: [
        {
          label: "Analytics Platform",
          href: "/products/analytics",
          description: "Comprehensive data analysis and visualization tools"
        },
        // More products...
      ]
    },
    {
      id: "services",
      title: "Services",
      links: [
        {
          label: "Implementation",
          href: "/services/implementation",
          description: "Expert services to get your systems up and running"
        },
        // More services...
      ]
    }
  ]}
/>

Props

Name Type Required Description
label string Yes Label for the popup navigation trigger button
groups Group[] Yes Array of link groups to display in the popup

Group Props

Name Type Required Description
id string No Unique identifier for the group. Auto-generated if title is provided
title string No Optional title for the group of links
links Link[] Yes Array of links in this group
Name Type Required Description
label string Yes Text label for the link
href string Yes URL for the link
description string No Optional description text for the link
current boolean No Whether this link represents the current page

Usage

Do’s

  • Use for complex navigation structures
  • Include descriptive text for each link when possible
  • Group related links with titles
  • Keep the link labels simple and scannable

Don’t’s

  • Don’t use if there are very few links
  • Don’t nest additional popups inside

Accessibility

Keyboard Navigation

Screen Reader Support