BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/octane/context-menu

Context Menu

octane/context-menu
FreeComponent

octane publishes no description for this item.

Live preview

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

Install it

npx shadcn@latest add https://raw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/context-menu.json

Source

ui/context-menu.tsrxraw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/context-menu.json · first 6 KB
1// Base UI base context-menu — runs on @octanejs/base-ui's `ContextMenu`. Class strings from the
2// maintainer-supplied radix source; every difference below was checked against rendered DOM.
3//
4// This is dropdown-menu's sibling and inherits its findings, WITH ONE IMPROVEMENT: `ContextMenu`
5// ships a real `Separator` part, which `Menu` does not, so the separator is the primitive here
6// rather than a plain host element. It emits `role="separator"`, `aria-orientation` and
7// `data-orientation`.
8//
9// CARRIED OVER FROM dropdown-menu, all re-verified against this primitive:
10// - Two CSS variables are renamed. Radix publishes per-component names; Base UI's Positioner
11// publishes generic ones, and a utility naming a variable nothing sets does nothing, silently:
12// --radix-context-menu-content-available-height -> --available-height
13// --radix-context-menu-content-transform-origin -> --transform-origin
14// - The submenu trigger marks itself open with `data-popup-open`, not the `data-open` the popup
15// carries, so radix's `data-open:bg-accent` would leave an open submenu's parent row unstyled.
16// - `Label` stays a plain `<div>`: `ContextMenu.GroupLabel` requires a `ContextMenu.Group`
17// ancestor and throws without one, while shadcn's label is used standalone.
18// - Radix's `focus:` item utilities carry over unchanged, because Base UI moves real DOM focus
19// onto the highlighted item as well as publishing `data-highlighted`.
20//
21// POSITIONING PROPS GO TO THE POSITIONER, NOT THE POPUP. Radix has one `Content` element that takes
22// them all; Base UI splits positioning into its own layer, so anything swept onto `Popup` by a rest
23// spread is inert — `side="top"` would silently leave the menu on its default side and also land on
24// the DOM as an invalid attribute. They are destructured and forwarded explicitly.
25import { type OctaneNode } from 'octane';
26import { ContextMenu as ContextMenuPrimitive } from '@octanejs/base-ui/context-menu';
27import { CheckIcon, ChevronRightIcon } from '@octanejs/lucide';
28
29import { cn } from '@/lib/utils';
30
31type Props = { className?: string; children?: OctaneNode } & Record<string, unknown>;
32
33export interface BaseUiPositioningProps {
34 /** Forwarded to the Positioner; see the note at the top of this file. */
35 side?: 'top' | 'right' | 'bottom' | 'left';
36 sideOffset?: number;
37 align?: 'start' | 'center' | 'end';
38 alignOffset?: number;
39 anchor?: unknown;
40 positionMethod?: 'absolute' | 'fixed';
41// … truncated

What it pulls in

npm packages

  • @octanejs/base-ui@0.1.28
  • @octanejs/lucide@0.1.25

Other registry items

  • @octane/utils

Files it writes

  • ui/context-menu.tsrx

Facts

Registry
octane
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-07
Last confirmed
2 days ago

Go to the source

Docs on octane octanejs.dev octanejs/octane on GitHub Raw registry item This item as JSON

More from octane

All 44 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionoctaneComponentsFree2 deps
AlertalertoctaneComponentsFree1 dep
Alert Dialogalert-dialogoctaneComponentsFree1 dep
Aspect Ratioaspect-ratiooctaneComponentsFreeno deps
AvataravataroctaneComponentsFree1 dep
BadgebadgeoctaneComponentsFree1 dep
BreadcrumbbreadcrumboctaneComponentsFree1 dep
ButtonbuttonoctaneComponentsFree2 deps
BlockDex

Built by

Kynth Studios

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 Studios

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 Studios

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