DropdownMenu (ui/dropdown-menu.tsx)

shadcn-admin · src/components/ui/dropdown-menu.tsx · typescript · MIT
ui, UI / Frontend

Reusable dropdown menu component with Radix UI primitives and Tailwind styling.

// Source: https://github.com/satnaing/shadcn-admin | License: MIT | Copyright 2024 Sat Naing
// Provided via justclaw.it.com; keep this notice with the code.
import * as React from 'react'
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu'
import { CheckIcon, ChevronRightIcon, CircleIcon } from 'lucide-react'
import { cn } from '@/lib/utils'

function DropdownMenu({
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {
  return <DropdownMenuPrimitive.Root data-slot='dropdown-menu' {...props} />
}

function DropdownMenuPortal({
  ...props
}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {
  return (
    <DropdownMenuPrimitive.Portal data-slot='dropdown-menu-portal' {...props} />
  )
}

function DropdownMenuTrigger({
  ...props
}: React.Co

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key