EXEPERTAI LAB

Research alpha

Time Machine
EXEPERTAI LAB
GALLERY / COLLECTION
← Browse Astryx gallery
TopNav·component·@astryxdesign/core

Top Nav Menu

Navigation item that displays a hover-triggered popover menu with rich items containing an icon, title, and optional description.

Open in Playground @astryxdesign/core/TopNav

Showcases and examples

2 documented examples

Top Nav Menu

Demonstrates TopNavMenu with a hover-triggered dropdown containing items with icons and descriptions.

Preview loads on approachPreview loads on approach
Exact source · top-nav-menu-showcase
// Copyright (c) Meta Platforms, Inc. and affiliates.

'use client';

import {
  TopNav,
  TopNavHeading,
  TopNavItem,
  TopNavMenu,
} from '@astryxdesign/core/TopNav';
import {Button} from '@astryxdesign/core/Button';
import {
  ChartBarIcon,
  Cog6ToothIcon,
  MagnifyingGlassIcon,
  UsersIcon,
} from '@heroicons/react/24/outline';

export default function TopNavMenuShowcase() {
  return (
    <TopNav
      style={{width: 600}}
      label="Menu demo"
      heading={<TopNavHeading heading="Platform" />}
      startContent={
        <>
          <TopNavItem label="Home" href="#" isSelected />
          <TopNavMenu
            label="Tools"
            items={[
              {
                title: 'Analytics',
                description: 'View traffic and engagement metrics',
                icon: <ChartBarIcon />,
                href: '#analytics',
              },
              {
                title: 'Team Members',
                description: 'Manage your team and permissions',
                icon: <UsersIcon />,
                href: '#team',
              },
              {
                title: 'Settings',
                description: 'Configure your workspace',
                icon: <Cog6ToothIcon />,
                href: '#settings',
              },
            ]}
          />
        </>
      }
      endContent={
        <Button
          label="Search"
          variant="ghost"
          icon={<MagnifyingGlassIcon />}
          isIconOnly
        />
      }
    />
  );
}

Usage

Navigation item that displays a hover-triggered popover menu with rich items containing an icon, title, and optional description.

Typed props

PropType and behavior
labelstring · required
Visible label for the trigger button.
itemsTopNavMenuItemData[] · required
Menu items to display in the hover popover. Item href values follow the shared navigation rule described on Link; rejected destinations remain visible without navigation.
delaynumber · default 150
Delay in milliseconds before showing the menu on hover.
hideDelaynumber · default 200
Delay in milliseconds before hiding the menu after the mouse leaves.