# birch-context-menu

> Custom context menu for react

Latest version **1.2.3** (published 2021-05-10) · MIT license · 0 weekly downloads

## Install

```sh
npm install birch-context-menu
pnpm add birch-context-menu
yarn add birch-context-menu
bun add birch-context-menu
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.3 |
| Published | 2021-05-10 |
| First published | 2019-04-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 36.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Tinia Labs |
| Maintainers | guycreate |
| Keywords | right, click, custom, context, menu, react, react-birch, tinia |

## Links

- npm: https://www.npmjs.com/package/birch-context-menu
- Repository: https://github.com/tinialabs/react-birch
- Homepage: https://github.com/tinialabs/react-birch#readme
- Issues: https://github.com/tinialabs/react-birch#issues
- npm.io page: https://npm.io/package/birch-context-menu

## Dependencies (2)

- [styled-components](https://npm.io/package/styled-components.md) ^5.3.0
- [birch-event-emitter](https://npm.io/package/birch-event-emitter.md) ^1.2.3

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.2.3 (latest) — 2021-05-10
- 1.2.2 — 2020-12-07
- 1.2.1 — 2020-12-06
- 1.2.0 — 2020-11-21
- 1.1.1 — 2020-02-23
- 1.1.0 — 2020-02-23
- 1.0.5 — 2019-12-03
- 1.0.4 — 2019-06-23
- 1.0.1 — 2019-04-26

## README

# birch-context-menu

Custom context (right click) menu for react.  Forked from `context-menu` and ported to React Hooks and `styled-components`

## Motivation and enhancements

* Included as a core dependency of `react-birch` directly in the mono repository
* Converted to use `React Hooks` throughout instead of React `Component`
* Added styling and theming based on `styled-components` instead of being hard-coded and limited to only light and dark
* css and sass converted to `styled-components`
* Uses React `createPortal` and creates a standalone `div` adjacent to and after the main component tree (eliminated need to use `ReactDOM.render` twice in one app 
* Eliminated reliance on singleton classes and instead uses React Context accessed through React Hooks
* Uses VSCode extension style API for configuration of menu items and groups

We use `birch-context-menu` and `react-birch` as drop in replacements for the VSCode TreeView and VSCode context menu / keyboard bindings in production apps based on the `monaco` editor.

## Simple usage

### Install
```bash
$ npm install birch-context-menu
```

---
_Source: https://npm.io/package/birch-context-menu · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
