Context Menu
gymnopedies/context-menuFreeComponent
Context Menu — gymnopédies-themed shadcn primitive.
Install it
npx shadcn@latest add https://gymnopedies.shoota.work/r/context-menu.jsonSource
1import * as React from "react"2import { ContextMenu as ContextMenuPrimitive } from "@base-ui/react/context-menu"34import { cn } from "@/lib/utils"5import { ChevronRightIcon, CheckIcon } from "lucide-react"67function ContextMenu({ ...props }: ContextMenuPrimitive.Root.Props) {8 return <ContextMenuPrimitive.Root data-slot="context-menu" {...props} />9}1011function ContextMenuPortal({ ...props }: ContextMenuPrimitive.Portal.Props) {12 return (13 <ContextMenuPrimitive.Portal data-slot="context-menu-portal" {...props} />14 )15}1617function ContextMenuTrigger({18 className,19 ...props20}: ContextMenuPrimitive.Trigger.Props) {21 return (22 <ContextMenuPrimitive.Trigger23 data-slot="context-menu-trigger"24 className={cn("select-none", className)}25 {...props}26 />27 )28}2930function ContextMenuContent({31 className,32 align = "start",33 alignOffset = 4,34 side = "right",35 sideOffset = 0,36 ...props37}: ContextMenuPrimitive.Popup.Props &38 Pick<39 ContextMenuPrimitive.Positioner.Props,40 "align" | "alignOffset" | "side" | "sideOffset"41 >) {42 return (43 <ContextMenuPrimitive.Portal>44 <ContextMenuPrimitive.Positioner45 className="isolate z-50 outline-none"46 align={align}47 alignOffset={alignOffset}48 side={side}49 sideOffset={sideOffset}50 >51 <ContextMenuPrimitive.Popup52 data-slot="context-menu-content"53 className={cn("z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg 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", className )}54 {...props}55 />56 </ContextMenuPrimitive.Positioner>57 </ContextMenuPrimitive.Portal>58 )59}6061function ContextMenuGroup({ ...props }: ContextMenuPrimitive.Group.Props) {62 return (63 <ContextMenuPrimitive.Group data-slot="context-menu-group" {...props} />64 )65}6667function ContextMenuLabel({68 className,69 inset,70 ...props71}: ContextMenuPrimitive.GroupLabel.Props & {72 inset?: boolean73}) {74 return (75 <ContextMenuPrimitive.GroupLabel76// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from gymnopedies
All 49 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | gymnopedies | Components | Free | 2 deps | |
| Alertalert | gymnopedies | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | gymnopedies | Components | Free | 1 dep | |
| Articlearticle | gymnopedies | Components | Free | no deps | |
| Aspect Ratioaspect-ratio | gymnopedies | Components | Free | no deps | |
| Avataravatar | gymnopedies | Components | Free | 1 dep | |
| Badgebadge | gymnopedies | Components | Free | 2 deps | |
| Breadcrumbbreadcrumb | gymnopedies | Components | Free | 2 deps |
