Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kanety/stimulus-contextmenu
https://github.com/kanety/stimulus-contextmenu
Last synced: 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 3 years ago)
- Default Branch: master
- Last Pushed: 2024-06-27T07:30:14.000Z (7 months ago)
- Last Synced: 2024-11-08T07:42:45.465Z (2 months ago)
- Language: JavaScript
- Size: 23.4 KB
- Stars: 2
- Watchers: 3
- 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).