base-ui icon indicating copy to clipboard operation
base-ui copied to clipboard

[menu] Create Context Menu component

Open michaldudak opened this issue 2 years ago • 4 comments

It should be possible to create a context menu using the existing Dropdown and Menu components. Instead of a MenuButton to toggle the menu's visibility, another trigger should be created.

michaldudak avatar Oct 12 '23 09:10 michaldudak

Is there a workaround for this?

sebinsua avatar Mar 13 '25 15:03 sebinsua

What do you mean by workaround? This issue is about creating a new component.

michaldudak avatar Mar 17 '25 07:03 michaldudak

@michaldudak I think @sebinsua means using the existing Menu component. There actually is a workaround if you use the anchor prop on Menu.Positioner (type of VirtualElement) and handle the context menu events yourself to pass in the coordinates:

https://codesandbox.io/p/sandbox/fervent-water-97rsft?file=%2Fsrc%2FApp.tsx

atomiks avatar Mar 17 '25 07:03 atomiks

Picking this up as Michał is working on Menubar

atomiks avatar Apr 01 '25 22:04 atomiks