# menu-lit-element

> menu-lit-element

Latest version **1.0.5** (published 2019-07-06) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install menu-lit-element
pnpm add menu-lit-element
yarn add menu-lit-element
bun add menu-lit-element
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2019-07-06 |
| First published | 2019-05-11 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 122.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Glen Kitchen |
| Maintainers | glenk |
| Keywords | web component, LitElement, lit-html, JavaScript |

## Links

- npm: https://www.npmjs.com/package/menu-lit-element
- Repository: https://github.com/glenkitchen/menu-lit-element
- Homepage: https://github.com/glenkitchen/menu-lit-element#readme
- Issues: https://github.com/glenkitchen/menu-lit-element/issues
- npm.io page: https://npm.io/package/menu-lit-element

## Dependencies (2)

- [lit-element](https://npm.io/package/lit-element.md) latest
- [@webcomponents/webcomponentsjs](https://npm.io/package/@webcomponents/webcomponentsjs.md) latest

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 1.0.5 (latest) — 2019-07-06
- 1.0.4 — 2019-07-01
- 1.0.3 — 2019-07-01
- 1.0.2 — 2019-05-13
- 1.0.1 — 2019-05-12
- 1.0.0 — 2019-05-11

## README

# menu-lit-element

 MenuLitComponent is an application menu component implemented as a [LitElement](https://lit-element.polymer-project.org/).

## Features
* Submenus
* Shortcut text
* Property driven
* Intuitive mouse events 
* Disabled menu items
* Written with TypeScript 

![alt text](https://github.com/glenkitchen/menu-lit-element/blob/master/menu-lit-element.gif "Application menu")

## Quick Start

To experiment with the MenuLitElement component.   

1. Clone this repo.

2. Install the dependencies with npm:
```
npm install 
```

3. Install the Polymer Cli:

```
npm install -g polymer-cli
```

4. Serve the project from the root directory with the Polymer Cli: 
```
polymer serve
```

5. Update the menu items in the constructor of the menu-lit-element.ts file     
```
this.rootMenu = [
      {
        text: 'File', menu: [
          { text: 'New File', shortCutText: 'Ctrl+Shift+N' },
          ...
```

## Using MenuLitComponent 

To use the MenuLitElement component in your code:

1. Install MenuLitElement from Npm 

```
npm install --save menu-lit-element.
```

2. Import MenuLitElement in JavaScript (or TypeScript):

```
import { MenuLitElement} 'menu-lit-element';
```

3. Add the menu-lit-element tag in html:

```
<menu-lit-element></menu-lit-element>
```
## Limitations
* The intent of this project was to learn [LitElement](https://lit-element.polymer-project.org/) by creating a real world web component. MenuLitElement is not  production complete.     
* Submenus in submenus are not supported. 

## Acknowledgements

* MenuLitElement is based on the application menu in [mxGraph](https://github.com/jgraph/mxgraph) and the accompanying [Graph Editor](https://jgraph.github.io/mxgraph/javascript/examples/grapheditor/www/index.html) example application.
* The project structure is based on the PolymerLabs [LitElement starter project](https://github.com/PolymerLabs/start-lit-element)

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