Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/stagas/x-context-menu
- Owner: stagas
- License: mit
- Created: 2022-06-21T09:47:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-21T14:52:13.000Z (about 2 years ago)
- Last Synced: 2024-10-08T14:11:42.939Z (about 1 month ago)
- Language: TypeScript
- Size: 57.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
x-context-menuContext 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
# Options
src/x-context-menu.tsx#L42
# ({ event })
# props
{
# event
src/x-context-menu.tsx#L42
MouseEvent
({ event }) =>
- VKid
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 {
# action
src/x-context-menu.tsx#L16
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 onContextMenu(ContextMenuProps) =>
Fn<[ named-tuple-member ], any>
## 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)