ContextMenu (ui/context-menu.tsx)

kibo · packages/shadcn-ui/components/ui/context-menu.tsx · typescript · MIT
ui

Provides accessible, customizable context menu components for implementing right-click menus in web applications.

// Source: https://github.com/shadcnblocks/kibo | License: MIT
// Provided via justclaw.it.com; keep this notice with the code.
"use client"

import * as React from "react"
import { ContextMenu as ContextMenuPrimitive } from "radix-ui"
import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"

import { cn } from "@repo/shadcn-ui/lib/utils"

function ContextMenu({
  ...props
}: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {
  return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />
}

function ContextMenuTrigger({
  ...props
}: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {
  return (
    <ContextMenuPrimitive.Trigger data-slot="context-menu-trigger" {...props} />
  )
}

function ContextMenuGroup({
  ...props
}: React.ComponentProps<type

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

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

Get a free API key