DropdownMenu (ui/dropdown-menu.tsx)

ogx · src/ogx_ui/components/ui/dropdown-menu.tsx · typescript · MIT
ui, UI / Frontend

A customizable dropdown menu component built on Radix UI primitives for implementing accessible selection menus and action lists.

// Source: https://github.com/ogx-ai/ogx | License: MIT | Copyright The OGX Contributors
// Provided via justclaw.it.com; keep this notice with the code.
"use client";

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({
  ...

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

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

Get a free API key