BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/thegridcn/context-menu

Context Menu

thegridcn/context-menu
FreeComponent

thegridcn publishes no description for this item.

See it running

Open the demo on thegridcn

thegridcn.com/r/context-menu
Open
This registry sends X-Frame-Options, so its page cannot be embedded here. The link is the same page the frame would have shown.

Install it

npx shadcn@latest add https://thegridcn.com/r/context-menu.json

Source

src/components/ui/context-menu.tsxthegridcn.com/r/context-menu.json · first 6 KB
1"use client"
2
3import * as React from "react"
4import * as ContextMenuPrimitive from "@radix-ui/react-context-menu"
5import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react"
6
7import { cn } from "@/lib/utils"
8
9function ContextMenu({
10 ...props
11}: React.ComponentProps<typeof ContextMenuPrimitive.Root>) {
12 return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />
13}
14
15function ContextMenuTrigger({
16 ...props
17}: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>) {
18 return (
19 <ContextMenuPrimitive.Trigger data-slot="context-menu-trigger" {...props} />
20 )
21}
22
23function ContextMenuGroup({
24 ...props
25}: React.ComponentProps<typeof ContextMenuPrimitive.Group>) {
26 return (
27 <ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />
28 )
29}
30
31function ContextMenuPortal({
32 ...props
33}: React.ComponentProps<typeof ContextMenuPrimitive.Portal>) {
34 return (
35 <ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />
36 )
37}
38
39function ContextMenuSub({
40 ...props
41}: React.ComponentProps<typeof ContextMenuPrimitive.Sub>) {
42 return <ContextMenuPrimitive.Sub data-slot="context-menu-sub" {...props} />
43}
44
45function ContextMenuRadioGroup({
46 ...props
47}: React.ComponentProps<typeof ContextMenuPrimitive.RadioGroup>) {
48 return (
49 <ContextMenuPrimitive.RadioGroup
50 data-slot="context-menu-radio-group"
51 {...props}
52 />
53 )
54}
55
56function ContextMenuSubTrigger({
57 className,
58 inset,
59 children,
60 ...props
61}: React.ComponentProps<typeof ContextMenuPrimitive.SubTrigger> & {
62 inset?: boolean
63}) {
64 return (
65 <ContextMenuPrimitive.SubTrigger
66 data-slot="context-menu-sub-trigger"
67 data-inset={inset}
68 className={cn(
69 "focus:bg-muted focus:text-primary data-[state=open]:bg-muted data-[state=open]:text-primary [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
70 className
71 )}
72 {...props}
73 >
74 {children}
75 <ChevronRightIcon className="ml-auto" />
76 </ContextMenuPrimitive.SubTrigger>
77 )
78}
79
80function ContextMenuSubContent({
81 className,
82 ...props
83}: React.ComponentProps<typeof ContextMenuPrimitive.SubContent>) {
84 return (
85 <ContextMenuPrimitive.SubContent
86 data-slot="context-menu-sub-content"
87 className={cn(
88// … truncated

What it pulls in

npm packages

  • @radix-ui/react-context-menu
  • lucide-react

Files it writes

  • src/components/ui/context-menu.tsx

Facts

Registry
thegridcn
Type
registry:component
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-01
Last confirmed
yesterday

Go to the source

Docs on thegridcn thegridcn.com Raw registry item This item as JSON

More from thegridcn

All 139 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionthegridcnComponentsFree2 deps
Agent Avataragent-avatarthegridcnComponentsFreeno deps
AlertalertthegridcnComponentsFree1 dep
Alert Dialogalert-dialogthegridcnComponentsFree1 dep
Announcement Barannouncement-barthegridcnComponentsFreeno deps
Anomaly Banneranomaly-bannerthegridcnComponentsFreeno deps
Arrival Panelarrival-panelthegridcnComponentsFreeno deps
Aspect Ratioaspect-ratiothegridcnComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex