About
A top-level site navigation bar with dropdown menus that glide a shared hover indicator between triggers and reveal their panels with a spring-based popup animation.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Motion Navigation Menu to your project and fits it to your theme.
Code
How Motion Navigation Menu is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import NavigationMenu, {
NavigationMenuContent,
NavigationMenuItem,
NavigationMenuLink,
NavigationMenuList,
NavigationMenuTrigger,
} from "@/components/ui/motion-navigation-menu";
const gettingStartedLinks = [
{
title: "Introduction",
description: "Learn what the library is and why it exists.",
},
{
title: "Installation",
description: "Add the package and set up your project.",
},
{ title: "Quick Start", description: "Build your first screen in minutes." },
];
const componentLinks = [
{
title: "Accordion",
description: "A vertically stacked set of collapsible panels.",
},
{
title: "Combobox",
description: "An input with a filterable list of suggestions.",
},
{
title: "Dropdown Menu",
description: "A menu of actions triggered by a button.",
},
{
title: "Tooltip",
description: "A popup that displays information on hover.",
},
];
export default function NavigationMenuDemo() {
return (
<div className="flex w-full items-center justify-center p-10">
<NavigationMenu>
<NavigationMenuList>
<NavigationMenuItem>
<NavigationMenuTrigger>Getting Started</NavigationMenuTrigger>
<NavigationMenuContent>
<ul className="grid w-[320px] gap-1">
{gettingStartedLinks.map((item) => (
<li key={item.title}>
<NavigationMenuLink
href="#"
className="flex-col items-start gap-0.5"
>
<div className="text-sm font-medium">{item.title}</div>
<p className="text-muted-foreground text-xs">
{item.description}
</p>
</NavigationMenuLink>
</li>
))}
</ul>
</NavigationMenuContent>
</NavigationMenuItem>
<NavigationMenuItem>
<NavigationMenuTrigger>Components</NavigationMenuTrigger>
<NavigationMenuContent>
<ul className="grid w-[360px] grid-cols-2 gap-1">
{componentLinks.map((item) => (
<li key={item.title}>
<NavigationMenuLink
href="#"
className="flex-col items-start gap-0.5"
>
<div className="text-sm font-medium">{item.title}</div>
<p className="text-muted-foreground text-xs">
{item.description}
</p>
</NavigationMenuLink>
</li>
))}
</ul>
</NavigationMenuContent>
</NavigationMenuItem>
<NavigationMenuItem>
<NavigationMenuLink href="#">Documentation</NavigationMenuLink>
</NavigationMenuItem>
</NavigationMenuList>
</NavigationMenu>
</div>
);
}
















