ui/dropdown-menu.tsx

PageAI-Pro/page-ui · components/shared/ui/dropdown-menu.tsx · typescript · MIT
ui

Reusable dropdown menu component with submenus, checkboxes, and radio items using Radix UI.

// Source: https://github.com/PageAI-Pro/page-ui | License: MIT | Copyright 2024 Shipixen
// 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 { Check, ChevronRight, Circle } from 'lucide-react';

import { cn } from '@/lib/utils';

const DropdownMenu = DropdownMenuPrimitive.Root;

const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;

const DropdownMenuGroup = DropdownMenuPrimitive.Group;

const DropdownMenuPortal = DropdownMenuPrimitive.Portal;

const DropdownMenuSub = DropdownMenuPrimitive.Sub;

const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;

const DropdownMenuSubTrigger = React.forwardRef<
  React.ElementRef<typeof DropdownMenuP

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

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

Get a free API key