{"id":18320586,"url":"https://github.com/lukasbach/chakra-ui-contextmenu","last_synced_at":"2026-03-05T03:31:21.347Z","repository":{"id":57196783,"uuid":"408891453","full_name":"lukasbach/chakra-ui-contextmenu","owner":"lukasbach","description":"Context Menu component for Chakra UI","archived":false,"fork":false,"pushed_at":"2022-10-27T14:33:38.000Z","size":1215,"stargazers_count":23,"open_issues_count":2,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-20T23:41:42.963Z","etag":null,"topics":["chakra","chakra-ui","component","context-menu","contextmenu","library","react","rightclick","tiny","typed","typings","ui"],"latest_commit_sha":null,"homepage":"http://lukasbach.github.io/chakra-ui-contextmenu/","language":"TypeScript","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/lukasbach.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}},"created_at":"2021-09-21T16:20:36.000Z","updated_at":"2024-04-15T11:17:10.000Z","dependencies_parsed_at":"2022-09-17T03:11:08.546Z","dependency_job_id":null,"html_url":"https://github.com/lukasbach/chakra-ui-contextmenu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lukasbach/chakra-ui-contextmenu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukasbach%2Fchakra-ui-contextmenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukasbach%2Fchakra-ui-contextmenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukasbach%2Fchakra-ui-contextmenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukasbach%2Fchakra-ui-contextmenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukasbach","download_url":"https://codeload.github.com/lukasbach/chakra-ui-contextmenu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukasbach%2Fchakra-ui-contextmenu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30108596,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T01:39:18.192Z","status":"online","status_checked_at":"2026-03-05T02:00:06.710Z","response_time":93,"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":["chakra","chakra-ui","component","context-menu","contextmenu","library","react","rightclick","tiny","typed","typings","ui"],"created_at":"2024-11-05T18:16:46.999Z","updated_at":"2026-03-05T03:31:21.309Z","avatar_url":"https://github.com/lukasbach.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# chakra-ui-contextmenu\n\n![](https://badgen.net/npm/v/chakra-ui-contextmenu)\n![](https://badgen.net/npm/types/chakra-ui-contextmenu)\n[![](https://badgen.net/bundlephobia/dependency-count/react-complex-tree)](https://bundlephobia.com/package/chakra-ui-contextmenu)\n[![](https://badgen.net/bundlephobia/minzip/react-complex-tree)](https://bundlephobia.com/package/chakra-ui-contextmenu)\n\n\u003e Context Menu component for Chakra UI\n\n![Demo for React Complex Tree](https://i.imgur.com/LDeTCoQ.gif)\n\n[Checkout the storybook for more examples!](http://lukasbach.github.io/chakra-ui-contextmenu/)\n\n## Installation\n\nTo start using chakra-ui-contextmenu, install it to your project as a dependency via\n\n```\nnpm install chakra-ui-contextmenu\n```\n\nthen import it and add your context menu component with\n\n```typescript jsx\nimport { ContextMenu } from 'chakra-ui-contextmenu';\nimport { Box, Button, ChakraProvider } from '@chakra-ui/react';\nimport { MenuList, MenuItem } from '@chakra-ui/menu';\n\nrender(\n  \u003cContextMenu\n    renderMenu={() =\u003e (\n      \u003cMenuList\u003e\n        \u003cMenuItem\u003eContext Menu Item 1\u003c/MenuItem\u003e\n        \u003cMenuItem\u003eContext Menu Item 2\u003c/MenuItem\u003e\n      \u003c/MenuList\u003e\n    )}\n  \u003e\n    {ref =\u003e \u003cdiv ref={ref}\u003eTarget\u003c/div\u003e}\n  \u003c/ContextMenu\u003e\n);\n```\n\n## Usage with Typescript\n\nWhen using Typescript, you can type the context menu component with the kind\nof target component to get better typings:\n\n```typescript jsx\nrender(\n  \u003cContextMenu\u003cHTMLDivElement\u003e\n    renderMenu={() =\u003e (\n      \u003cMenuList\u003e\n        \u003cMenuItem\u003eContext Menu Item 1\u003c/MenuItem\u003e\n        \u003cMenuItem\u003eContext Menu Item 2\u003c/MenuItem\u003e\n      \u003c/MenuList\u003e\n    )}\n  \u003e\n    {ref =\u003e \u003cdiv ref={ref}\u003eTarget\u003c/div\u003e}\n  \u003c/ContextMenu\u003e\n);\n```\n\n## Props\n\nThe `ContextMenu` component provides the following props:\n\n```typescript\nexport interface ContextMenuProps\u003cT extends HTMLElement\u003e {\n  renderMenu: () =\u003e JSX.Element | null;\n  children: (ref: MutableRefObject\u003cT | null\u003e) =\u003e JSX.Element | null;\n  menuProps?: MenuProps;\n  portalProps?: PortalProps;\n  menuButtonProps?: MenuButtonProps;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukasbach%2Fchakra-ui-contextmenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukasbach%2Fchakra-ui-contextmenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukasbach%2Fchakra-ui-contextmenu/lists"}