base-ui
base-ui copied to clipboard
[menu] Create Context Menu component
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.
Is there a workaround for this?
What do you mean by workaround? This issue is about creating a new component.
@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
Picking this up as Michał is working on Menubar