All Projects → Fabriquartz → ember-right-click-menu

Fabriquartz / ember-right-click-menu

Licence: MIT license
An easy and flexible addon to add context menus anywhere in your application

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
Handlebars
879 projects
HTML
75241 projects

Projects that are alternatives of or similar to ember-right-click-menu

xMenuTools
Extended context menu tools for Windows
Stars: ✭ 56 (+300%)
Mutual labels:  context, menu, context-menu, right-click
ember-ref-bucket
This is list of handy ember primitives, created to simplify class-based dom workflow
Stars: ✭ 31 (+121.43%)
Mutual labels:  ember, addon, ember-addon
ember-best-language
🏳 A FastBoot-enabled addon to detect the best language for your user.
Stars: ✭ 18 (+28.57%)
Mutual labels:  ember, addon, ember-addon
Ember Font Awesome
ember-cli addon for using Font Awesome icons in Ember apps
Stars: ✭ 225 (+1507.14%)
Mutual labels:  ember, addon, ember-addon
ember-vertical-timeline
A Vertical Timeline for Ember.js apps 🚀
Stars: ✭ 19 (+35.71%)
Mutual labels:  ember, addon, ember-addon
ember-cli-daterangepicker
Just a simple component to use bootstrap-daterangepicker.
Stars: ✭ 32 (+128.57%)
Mutual labels:  ember, addon, ember-addon
Ember Burger Menu
An off-canvas sidebar component with a collection of animations and styles using CSS transitions
Stars: ✭ 280 (+1900%)
Mutual labels:  ember, ember-addon, menu
Ember Tooltips
Easy and extendible tooltips for Ember components - http://sir-dunxalot.github.io/ember-tooltips/
Stars: ✭ 205 (+1364.29%)
Mutual labels:  ember, ember-addon
Ember Models Table
Table with pagination, sorting, filtering and much more
Stars: ✭ 212 (+1414.29%)
Mutual labels:  ember, ember-addon
ember-cli-nouislider
{{range-slider}} component for ember-cli powered by noUiSlider
Stars: ✭ 43 (+207.14%)
Mutual labels:  ember, ember-addon
Ember Service Worker
A pluggable approach to Service Workers for Ember.js
Stars: ✭ 227 (+1521.43%)
Mutual labels:  ember, ember-addon
Ember Lifeline
An Ember addon for managing the lifecyle of asynchronous behavior in your objects
Stars: ✭ 241 (+1621.43%)
Mutual labels:  ember, ember-addon
ember-pipeline
Railway oriented programming in Ember
Stars: ✭ 17 (+21.43%)
Mutual labels:  ember, ember-addon
JonContextMenu
A beautiful and minimalist arc menu like the Pinterest one, written in Swift
Stars: ✭ 60 (+328.57%)
Mutual labels:  menu, context-menu
Emberx Select
Select component for Ember based on the native html select element.
Stars: ✭ 202 (+1342.86%)
Mutual labels:  ember, ember-addon
Ember Cli Document Title
Adding document title behaviour to your ember app
Stars: ✭ 220 (+1471.43%)
Mutual labels:  ember, ember-addon
Ember Power Calendar
Powerful and customizable calendar component for Ember
Stars: ✭ 200 (+1328.57%)
Mutual labels:  ember, addon
Ember Page Title
Page title management for Ember.js Apps
Stars: ✭ 177 (+1164.29%)
Mutual labels:  ember, addon
ember-data-contentful
Ember Data adapter for contentful.com
Stars: ✭ 33 (+135.71%)
Mutual labels:  ember, ember-addon
ember-window-messenger
This aims to be an simple window postMessage services provider.
Stars: ✭ 17 (+21.43%)
Mutual labels:  ember, addon

Build Status Ember Observer Score Maintainability

Ember Right Click Menu

An easy and flexible addon to add context menus anywhere in your application

Compatibility

This addon is made for Ember Octane, with glimmer components

  • Ember.js v3.20 or above
  • Ember CLI v3.20 or above
  • Node.js v12 or above

Installation

ember install ember-right-click-menu

Setup

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>

Preview

Ember Right Click Menu

Live demo: https://fabriquartz.github.io/ember-right-click-menu/

Usage

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:

  • action (function to trigger on click)
  • class (string to add classnames to the list item)
  • disabled (boolean to enable/disable a list item)
  • divider (boolean to add a visual divider after the list item it's on)
  • title (string to show in the list item)

Customize

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>

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].