Home / Function/ NavigationMenuViewport() — ui Function Reference

NavigationMenuViewport() — ui Function Reference

Architecture documentation for the NavigationMenuViewport() function in navigation-menu.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  f3e03374_1302_5dfe_6d9d_b1cc521c2045["NavigationMenuViewport()"]
  5dd8439c_def9_bbce_e572_888da1193e3b["navigation-menu.tsx"]
  f3e03374_1302_5dfe_6d9d_b1cc521c2045 -->|defined in| 5dd8439c_def9_bbce_e572_888da1193e3b
  style f3e03374_1302_5dfe_6d9d_b1cc521c2045 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/examples/radix/ui/navigation-menu.tsx lines 100–120

function NavigationMenuViewport({
  className,
  ...props
}: React.ComponentProps<typeof NavigationMenuPrimitive.Viewport>) {
  return (
    <div
      className={cn(
        "absolute top-full left-0 isolate z-50 flex justify-center"
      )}
    >
      <NavigationMenuPrimitive.Viewport
        data-slot="navigation-menu-viewport"
        className={cn(
          "bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:zoom-out-95 data-open:zoom-in-90 ring-foreground/10 origin-top-center relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-lg shadow ring-1 duration-100 md:w-(--radix-navigation-menu-viewport-width)",
          className
        )}
        {...props}
      />
    </div>
  )
}

Subdomains

Frequently Asked Questions

What does NavigationMenuViewport() do?
NavigationMenuViewport() is a function in the ui codebase, defined in apps/v4/examples/radix/ui/navigation-menu.tsx.
Where is NavigationMenuViewport() defined?
NavigationMenuViewport() is defined in apps/v4/examples/radix/ui/navigation-menu.tsx at line 100.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free