https://github.com/kanety/stimulus-contextmenu
https://github.com/kanety/stimulus-contextmenu
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kanety/stimulus-contextmenu
- Owner: kanety
- License: mit
- Created: 2021-10-09T07:23:05.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2026-01-11T06:20:39.000Z (4 months ago)
- Last Synced: 2026-02-20T02:04:25.926Z (2 months ago)
- Language: JavaScript
- Size: 27.3 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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).