Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
ember-right-click-menu
Advanced tools
An easy and flexible addon to add context menus anywhere in your application
An easy and flexible addon to add context menus anywhere in your application
This addon is made for Ember Octane, with glimmer components
ember install ember-right-click-menu
The right click menu needs some styling, which must be included manually. Add one of the following imports to your application. If you don't want any custom styling and style the right click menu on your own, you can just import the default.
@import 'ember-right-click-menu';
@import 'ember-right-click-menu-default'; /* without any additional styling */
If you don't want to include material icons, you can add the following lines to your styling instead
.ember-right-click-menu {
display: none;
}
.ember-right-click-menu[data-show] {
display: block;
}
In oder to make the context-menu work, you need to include the following line in your application. For example in the index.html or application.hbs.
<div id="ember-right-click-menu-wormhole"></div>
Live demo: https://fabriquartz.github.io/ember-right-click-menu/
The right click menu will be applied to its parent element. Options for the right click menu are added via a simple list of objects that contain a name, an action and a property to make it disabled. You can nest options to create a multi level context menu.
items = [
{ title: "Link", action: this.saveHyrule },
{ title: "Zelda", action: this.petEpona, disabled: true },
{ title: "Navi", items: [
{ title: "Annoy the gamer", action: this.sayHeyListen },
{ title: "Help Link out", action: this.sayHeyListen },
{ title: "Yell for attention", action: this.sayHeyListen },
]}
]
<span>
Element with context menu
<RightClickMenu @items={{this.items}} />
</span>
The following attributes can be used to add your items:
You can render your own template or component in the menu item by passing as shown in the example below. Add anything you like to your list of objects (as shown before) to be able to use it in your template.
<span>
Element with context menu
<RightClickMenu @items={{this.items}} as |item|>
<div>
<PaperIcon @icon={{@item.iconName}}>
<label>
{{@item.title}}
</label>
<span class="subtitle">
{{@item.subtitle}}
</span>
</div>
</RightClickMenu>
</span>
See the Contributing guide for details.
This project is licensed under the MIT License.
FAQs
An easy and flexible addon to add context menus anywhere in your application
The npm package ember-right-click-menu receives a total of 33 weekly downloads. As such, ember-right-click-menu popularity was classified as not popular.
We found that ember-right-click-menu demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.