{"id":17458131,"url":"https://github.com/pocesar/react-semantic-ui-contextmenu","last_synced_at":"2026-05-15T08:34:01.288Z","repository":{"id":138844496,"uuid":"149917023","full_name":"pocesar/react-semantic-ui-contextmenu","owner":"pocesar","description":"Thin wrapper for (context) menu using React Semantic-UI","archived":false,"fork":false,"pushed_at":"2018-09-22T21:50:55.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-29T06:44:15.484Z","etag":null,"topics":["contextmenu","electron","react","react-component","react-components","reactjs","right-click","semantic-ui","semantic-ui-react"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pocesar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-22T20:44:44.000Z","updated_at":"2020-03-02T06:29:09.000Z","dependencies_parsed_at":"2023-03-17T23:15:12.307Z","dependency_job_id":null,"html_url":"https://github.com/pocesar/react-semantic-ui-contextmenu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pocesar/react-semantic-ui-contextmenu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Freact-semantic-ui-contextmenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Freact-semantic-ui-contextmenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Freact-semantic-ui-contextmenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Freact-semantic-ui-contextmenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pocesar","download_url":"https://codeload.github.com/pocesar/react-semantic-ui-contextmenu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pocesar%2Freact-semantic-ui-contextmenu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33059510,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-15T02:00:06.351Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contextmenu","electron","react","react-component","react-components","reactjs","right-click","semantic-ui","semantic-ui-react"],"created_at":"2024-10-18T03:55:09.240Z","updated_at":"2026-05-15T08:34:01.272Z","avatar_url":"https://github.com/pocesar.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# React Semantic-UI context menu\nThin wrapper for (context) menu using React Semantic-UI\n\n## Usage\n\n```jsx\nimport React from 'react'\nimport { ContextMenu } from 'react-semantic-ui-contextmenu'\nimport { Dropdown } from 'semantic-ui-react'\n\nclass MyContextMenuComponent extends React.Component {\n  divRef = React.createRef()\n  div2Ref = React.createRef()\n  \n  menuContent = ({ close, target }) =\u003e (\n    \u003cReact.Fragment\u003e\n      {/* it's actually a Menu.Item with some ready-to-use functionality */}\n      \u003cContextMenu.Item onClick={() =\u003e { doSomething().then(close) }}\u003e \n        Open in new window\n      \u003c/ContextMenu.Item\u003e\n\n      \u003cContextMenu.Item onClick={close}\u003e\n        Close menu\n      \u003c/ContextMenu.Item\u003e\n      \n      {this.div2Ref.current === target ? (\n        \u003cContextMenu.Item\u003e\n          This only exists in \"Also right click me\"\n        \u003c/ContextMenu.Item\u003e\n      ) : null}\n      \n      {/* behaves exactly like https://react.semantic-ui.com/collections/menu/#content-sub-menu */}\n      \u003cDropdown item text='More'\u003e \n        \u003cDropdown.Menu\u003e\n          \u003cDropdown.Item icon='edit' text='Edit Profile' /\u003e\n          \u003cDropdown.Item icon='globe' text='Choose Language' /\u003e\n          \u003cDropdown.Item icon='settings' text='Account Settings' /\u003e\n        \u003c/Dropdown.Menu\u003e\n      \u003c/Dropdown\u003e\n    \u003c/React.Fragment\u003e\n  )\n\n  /* \n  takes an array of refs, multiple items can trigger the same context menu,\n  but can trigger the open/close from outside using isOpen \n  */\n\n  contextTargets = [this.divRef, this.div2Ref]\n  \n  onOpen = ({ target }) =\u003e {\n    console.log('context menu opened', target)\n  }\n  \n  onClose = () =\u003e {\n    console.log('context menu closed')\n  }\n  \n  render() {\n    return (\n      \u003cdiv\u003e\n        \u003cContextMenu for={this.contextTargets} isOpen={false} onOpen={this.onOpen} onClose={this.onClose}\u003e\n          {this.menuContent}\n        \u003c/ContextMenu\u003e\n        \u003cdiv ref={this.divRef}\u003eRight click me\u003c/div\u003e\n        \u003cdiv ref={this.div2Ref}\u003eAlso right click me\u003c/div\u003e\n      \u003c/div\u003e\n    )\n  }\n}\n```\n\n## Why reusing Menu (and Menu.Item)?\n\nThe Semantic-UI Menu component makes it able to create complex, multi level menus without a major effort, making it really easy to create complex menus that are reusable and context-aware\n\n## License \n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpocesar%2Freact-semantic-ui-contextmenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpocesar%2Freact-semantic-ui-contextmenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpocesar%2Freact-semantic-ui-contextmenu/lists"}