Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/stagas/x-context-menu

Context menu for x-popup.
https://github.com/stagas/x-context-menu

Last synced: 14 days ago
JSON representation

Context menu for x-popup.

Awesome Lists containing this project

README

        


x-context-menu

Context menu for x-popup.



npm i x-context-menu

pnpm add x-context-menu

yarn add x-context-menu

## API

# ContextMenuProps src/x-context-menu.tsx#L36

# anchorDestination src/x-context-menu.tsx#L37

    HTMLElement

# popupDestination src/x-context-menu.tsx#L38

    HTMLElement

# scene src/x-context-menu.tsx#L40

    PopupScene

# sticky src/x-context-menu.tsx#L41

    boolean

# surface src/x-context-menu.tsx#L39

    SurfaceElement

# ContextMenuOption({ action, children, disabled, keyboard }) src/x-context-menu.tsx#L15 # children src/x-context-menu.tsx#L19

    VKid

# disabled src/x-context-menu.tsx#L17

    boolean

# keyboard src/x-context-menu.tsx#L18

    string []

}

ContextMenuOption({ action, children, disabled, keyboard })  =>

    VKid
# onContextMenu(ContextMenuProps) src/x-context-menu.tsx#L45

## Credits

- [relative-mouse](https://npmjs.org/package/relative-mouse) by [stagas](https://github.com/stagas) – Get mouse position relative to a DOM element.
- [sigl](https://npmjs.org/package/sigl) by [stagas](https://github.com/stagas) – Web framework
- [x-popup](https://npmjs.org/package/x-popup) by [stagas](https://github.com/stagas) – Popup Web Component used for tooltips and context menus
- [x-surface](https://npmjs.org/package/x-surface) by [stagas](https://github.com/stagas) – Infinitely pannable and zoomable HTML surface as a Web Component.

## Contributing

[Fork](https://github.com/stagas/x-context-menu/fork) or [edit](https://github.dev/stagas/x-context-menu) and submit a PR.

All contributions are welcome!

## License

MIT © 2022 [stagas](https://github.com/stagas)