context-menu
agentmesh/context-menuFreeComponent
shadcn/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/ombhanushaliii/agentmesh/main/example/ui/apps/v4/public/r/styles/base-vega/context-menu.jsonSource
1"use client"23import * as React from "react"4import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu"56import { cn } from "@/registry/base-vega/lib/utils"7import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"89function ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props) {10 return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />11}1213function ContextMenuPortal({ ...props }: ContextMenuPrimitive.Portal.Props) {14 return (15 <ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />16 )17}1819function ContextMenuTrigger({20 className,21 ...props22}: ContextMenuPrimitive.Trigger.Props) {23 return (24 <ContextMenuPrimitive.Trigger25 data-slot="context-menu-trigger"26 className={cn("select-none", className)}27 {...props}28 />29 )30}3132function ContextMenuContent({33 className,34 align = "start",35 alignOffset = 4,36 side = "right",37 sideOffset = 0,38 ...props39}: ContextMenuPrimitive.Popup.Props &40 Pick<41 ContextMenuPrimitive.Positioner.Props,42 "align" | "alignOffset" | "side" | "sideOffset"43 >) {44 return (45 <ContextMenuPrimitive.Portal>46 <ContextMenuPrimitive.Positioner47 className="isolate z-50 outline-none"48 align={align}49 alignOffset={alignOffset}50 side={side}51 sideOffset={sideOffset}52 >53 <ContextMenuPrimitive.Popup54 data-slot="context-menu-content"55 className={cn(56 "cn-menu-target cn-menu-translucent z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-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 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",57 className58 )}59 {...props}60 />61 </ContextMenuPrimitive.Positioner>62 </ContextMenuPrimitive.Portal>63 )64}6566function ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props) {67 return (68 <ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />69 )70}7172function ContextMenuLabel({73 className,74 inset,75 ...props76// … truncated
Files it writes
More from shadcn/ui
All 201 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn/ui | Components | Free | no deps | |
| alertalert | shadcn/ui | Components | Free | no deps | |
| alert-dialogalert-dialog | shadcn/ui | Components | Free | no deps | |
| aspect-ratioaspect-ratio | shadcn/ui | Components | Free | no deps | |
| avataravatar | shadcn/ui | Components | Free | no deps | |
| badgebadge | shadcn/ui | Components | Free | no deps | |
| breadcrumbbreadcrumb | shadcn/ui | Components | Free | no deps | |
| buttonbutton | shadcn/ui | Components | Free | no deps |
