Context Menu
boldkit/context-menuFreeComponent
Displays a menu triggered by right-click with neubrutalism styling
Live preview
live · rendered by the registry
Rendered by boldkit on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://boldkit.dev/r/context-menu.jsonSource
1import * as React from 'react'2import * as ContextMenuPrimitive from '@radix-ui/react-context-menu'3import { Check, ChevronRight, Circle } from 'lucide-react'4import { cn } from '@/lib/utils'56const ContextMenu = ContextMenuPrimitive.Root7const ContextMenuTrigger = ContextMenuPrimitive.Trigger8const ContextMenuGroup = ContextMenuPrimitive.Group9const ContextMenuPortal = ContextMenuPrimitive.Portal10const ContextMenuSub = ContextMenuPrimitive.Sub11const ContextMenuRadioGroup = ContextMenuPrimitive.RadioGroup1213const ContextMenuSubTrigger = React.forwardRef<14 React.ElementRef<typeof ContextMenuPrimitive.SubTrigger>,15 React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubTrigger> & {16 inset?: boolean17 }18>(({ className, inset, children, ...props }, ref) => (19 <ContextMenuPrimitive.SubTrigger20 ref={ref}21 className={cn(22 'flex cursor-default select-none items-center px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent',23 inset && 'pl-8',24 className25 )}26 {...props}27 >28 {children}29 <ChevronRight className="ml-auto h-4 w-4 stroke-[3]" />30 </ContextMenuPrimitive.SubTrigger>31))32ContextMenuSubTrigger.displayName = ContextMenuPrimitive.SubTrigger.displayName3334const ContextMenuSubContent = React.forwardRef<35 React.ElementRef<typeof ContextMenuPrimitive.SubContent>,36 React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.SubContent>37>(({ className, ...props }, ref) => (38 <ContextMenuPrimitive.SubContent39 ref={ref}40 className={cn(41 'z-50 min-w-[8rem] overflow-hidden border-3 border-foreground bg-popover p-1 text-popover-foreground shadow-[4px_4px_0px_hsl(var(--shadow-color))] ease-out origin-[var(--radix-popper-content-transform-origin)] 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',42 className43 )}44 {...props}45 />46))47ContextMenuSubContent.displayName = ContextMenuPrimitive.SubContent.displayName4849const ContextMenuContent = React.forwardRef<50 React.ElementRef<typeof ContextMenuPrimitive.Content>,51 React.ComponentPropsWithoutRef<typeof ContextMenuPrimitive.Content>52>(({ className, ...props }, ref) => (53 <ContextMenuPrimitive.Portal>54 <ContextMenuPrimitive.Content55 ref={ref}56// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from boldkit
All 94 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | boldkit | Components | Free | 2 deps | |
| Alertalert | boldkit | Components | Free | 2 deps | |
| Alert Dialogalert-dialog | boldkit | Components | Free | 1 dep | |
| ASCII Shapesascii-shapes | boldkit | Components | Free | no deps | |
| Aspect Ratioaspect-ratio | boldkit | Components | Free | 1 dep | |
| Avataravatar | boldkit | Components | Free | 1 dep | |
| Badgebadge | boldkit | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | boldkit | Components | Free | 2 deps |
