c-navigation-menu-2.tsx
import {
NavigationMenu,
NavigationMenuContent,
NavigationMenuItem,
NavigationMenuLink,
NavigationMenuList,
NavigationMenuTrigger,
} from "@/components/ui/navigation-menu"
const components = [
{
title: "Alert Dialog",
href: "#",
description:
"A modal dialog that interrupts the user with important content.",
},
{
title: "Hover Card",
href: "#",
description:
"For sighted users to preview content available behind a link.",
},
{
title: "Progress",
href: "#",
description:
"Displays an indicator showing the completion progress of a task.",
},
{
title: "Scroll-area",
href: "#",
description: "Visually or semantically separates content.",
},
]
export function Pattern() {
return (
<div className="flex items-center justify-center">
<NavigationMenu>
<NavigationMenuList>
<NavigationMenuItem>
<NavigationMenuTrigger>Components</NavigationMenuTrigger>
<NavigationMenuContent>
<ul className="grid w-[400px] gap-2 md:w-[500px] md:grid-cols-2">
{components.map((component) => (
<li key={component.title}>
<NavigationMenuLink
render={<a href={component.href} />}
className="flex flex-col items-start gap-2 p-3"
>
<div className="text-sm leading-none font-medium">
{component.title}
</div>
<p className="text-muted-foreground line-clamp-2 text-sm leading-snug">
{component.description}
</p>
</NavigationMenuLink>
</li>
))}
</ul>
</NavigationMenuContent>
</NavigationMenuItem>
</NavigationMenuList>
</NavigationMenu>
</div>
)
}



























