BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/shadcn/context-menu

context-menu

shadcn/context-menu
FreeComponent

shadcn publishes no description for this item.

Live preview

live · rendered by the registry
Rendered by shadcn on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add context-menu

Source

ui/context-menu.tsxui.shadcn.com/r/styles/new-york/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 { Check, ChevronRight, Circle } from "lucide-react"
6
7import { cn } from "@/lib/utils"
8
9const ContextMenu = ContextMenuPrimitive.Root
10
11const ContextMenuTrigger = ContextMenuPrimitive.Trigger
12
13const ContextMenuGroup = ContextMenuPrimitive.Group
14
15const ContextMenuPortal = ContextMenuPrimitive.Portal
16
17const ContextMenuSub = ContextMenuPrimitive.Sub
18
19const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup
20
21const ContextMenuSubTrigger = React.forwardRef<
22 React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,
23 React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {
24 inset?: boolean
25 }
26>(({ className, inset, children, ...props }, ref) => (
27 <ContextMenuPrimitive.SubTrigger
28 ref={ref}
29 className={cn(
30 "flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
31 inset && "pl-8",
32 className
33 )}
34 {...props}
35 >
36 {children}
37 <ChevronRight className="ml-auto h-4 w-4" />
38 </ContextMenuPrimitive.SubTrigger>
39))
40ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName
41
42const ContextMenuSubContent = React.forwardRef<
43 React.ElementRef<typeof ContextMenuPrimitive.SubContent>,
44 React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>
45>(({ className, ...props }, ref) => (
46 <ContextMenuPrimitive.SubContent
47 ref={ref}
48 className={cn(
49 "z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-context-menu-content-transform-origin]",
50 className
51 )}
52 {...props}
53 />
54))
55ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName
56
57const ContextMenuContent = React.forwardRef<
58 React.ElementRef<typeof ContextMenuPrimitive.Content>,
59 React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>
60>(({ className, ...props }, ref) => (
61 <ContextMenuPrimitive.Portal>
62// … truncated

Files it writes

  • ui/context-menu.tsx

Facts

Registry
shadcn
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

Docs on shadcn ui.shadcn.com shadcn-ui/ui on GitHub Raw registry item This item as JSON

More from shadcn

All 63 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
accordionaccordionshadcnComponentsFreeno deps
alertalertshadcnComponentsFreeno deps
alert-dialogalert-dialogshadcnComponentsFreeno deps
aspect-ratioaspect-ratioshadcnComponentsFreeno deps
attachmentattachmentshadcnComponentsFreeno deps
avataravatarshadcnComponentsFreeno deps
badgebadgeshadcnComponentsFreeno deps
breadcrumbbreadcrumbshadcnComponentsFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex