Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kanety/stimulus-contextmenu


https://github.com/kanety/stimulus-contextmenu

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# stimulus-contextmenu

A stimulus controller for simple contextmenu.

## Dependencies

* @hotwired/stimulus 3.0+

## Installation

Install from npm:

$ npm install @kanety/stimulus-contextmenu --save

## Usage

Register controller:

```javascript
import { Application } from '@hotwired/stimulus';
import ContextmenuController from '@kanety/stimulus-contextmenu';

const application = Application.start();
application.register('contextmenu', ContextmenuController);
```

Import css:

```css
@import '@kanety/stimulus-contextmenu';
```

Build html as follows:

```html


content


content




```

You can specify context area bound to menu:

```html



content


content





```

You can also use [@kanety/stimulus-menu](https://github.com/kanety/stimulus-menu) as menu:

```html


content


content




```

## License

The library is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).