Home / File/ dropdown-menu.tsx — ui Source File

dropdown-menu.tsx — ui Source File

Architecture documentation for dropdown-menu.tsx, a tsx file in the ui codebase. 4 imports, 0 dependents.

File tsx DocumentationAtlas Changelog 4 imports 15 functions

Entity Profile

Dependency Diagram

graph LR
  1559eaad_14f8_0916_ccf8_56a1d4e5399e["dropdown-menu.tsx"]
  1d141819_425e_b5fd_4c8e_32f7c6a42cf2["react"]
  1559eaad_14f8_0916_ccf8_56a1d4e5399e --> 1d141819_425e_b5fd_4c8e_32f7c6a42cf2
  3d9438e8_7604_787c_4898_907262aff28b["utils"]
  1559eaad_14f8_0916_ccf8_56a1d4e5399e --> 3d9438e8_7604_787c_4898_907262aff28b
  eb7dac7f_a10e_776a_6aeb_482178aef74f["menu"]
  1559eaad_14f8_0916_ccf8_56a1d4e5399e --> eb7dac7f_a10e_776a_6aeb_482178aef74f
  d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3["lucide-react"]
  1559eaad_14f8_0916_ccf8_56a1d4e5399e --> d39cd1e4_1b2d_9aa2_1d29_fd0b4bfb61c3
  style 1559eaad_14f8_0916_ccf8_56a1d4e5399e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import * as React from "react"
import { cn } from "@/examples/base/lib/utils"
import { Menu as MenuPrimitive } from "@base-ui/react/menu"
import { CheckIcon, ChevronRightIcon } from "lucide-react"

function DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {
  return <MenuPrimitive.Root data-slot="dropdown-menu" {...props} />
}

function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {
  return <MenuPrimitive.Portal data-slot="dropdown-menu-portal" {...props} />
}

function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {
  return <MenuPrimitive.Trigger data-slot="dropdown-menu-trigger" {...props} />
}

function DropdownMenuContent({
  align = "start",
  alignOffset = 0,
  side = "bottom",
  sideOffset = 4,
  className,
  ...props
}: MenuPrimitive.Popup.Props &
  Pick<
    MenuPrimitive.Positioner.Props,
    "align" | "alignOffset" | "side" | "sideOffset"
  >) {
  return (
    <MenuPrimitive.Portal>
      <MenuPrimitive.Positioner
        className="isolate z-50 outline-none"
        align={align}
        alignOffset={alignOffset}
        side={side}
        sideOffset={sideOffset}
      >
        <MenuPrimitive.Popup
          data-slot="dropdown-menu-content"
          className={cn(
            "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground data-[side=inline-start]:slide-in-from-right-2 data-[side=inline-end]:slide-in-from-left-2 cn-menu-target z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg p-1 shadow-md ring-1 duration-100 outline-none data-closed:overflow-hidden",
            className
          )}
          {...props}
        />
      </MenuPrimitive.Positioner>
    </MenuPrimitive.Portal>
  )
}

function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {
  return <MenuPrimitive.Group data-slot="dropdown-menu-group" {...props} />
}

function DropdownMenuLabel({
  className,
  inset,
// ... (212 more lines)

Subdomains

Dependencies

  • lucide-react
  • menu
  • react
  • utils

Frequently Asked Questions

What does dropdown-menu.tsx do?
dropdown-menu.tsx is a source file in the ui codebase, written in tsx. It belongs to the DocumentationAtlas domain, Changelog subdomain.
What functions are defined in dropdown-menu.tsx?
dropdown-menu.tsx defines 15 function(s): DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, and 5 more.
What does dropdown-menu.tsx depend on?
dropdown-menu.tsx imports 4 module(s): lucide-react, menu, react, utils.
Where is dropdown-menu.tsx in the architecture?
dropdown-menu.tsx is located at apps/v4/examples/base/ui/dropdown-menu.tsx (domain: DocumentationAtlas, subdomain: Changelog, directory: apps/v4/examples/base/ui).

Analyze Your Own Codebase

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

Try Supermodel Free