0.2.0 • Public • Published


Build Status Ember Observer Score npm version

Mobile friendly Ember menu component using CSS transitions. More effects and SVG path animations coming soon.



Check out the live demo here

Ember Compability

This addon is compatible with and tested against Ember 2.x and higher.


ember install ember-side-menu

Import ember-side-menu styles in your application's app.scss file.

@import "ember-side-menu";


Side Menu

{{#side-menu}} component is a main container of your menu. Place it on some top level of your DOM document for example in application.hbs file.

  <header class="navbar navbar-default">
    <div class="navbar-header">
  <ul class="nav">
    <li class="header">Events</li>
      {{#side-menu-link-to "new"}}
        {{inline-svg "plus" class="icon"}}
        New Event
    <li class="divider"></li>
      <a href="https://cowbell-labs.com/" target="_blank">
        {{inline-svg "cowbell" class="icon cowbell"}}
        Cowbell Labs
<div class="page-content">
  {{partial "shared/navbar"}}
    <div class="container">
  {{outlet "footer"}}


  • id - (string), menu Id, use when using multiple menus, default: "default"
  • side - (string), which side of screen your menu takes. Possible values: ["left", "right"], default: "left"
  • width - (string), target width of open menu. CSS width - example values: ["40px", "40%", ...], default: null (default width set in CSS stylesheet to 70%)
  • initialTapAreaWidth - (integer, in px) - area width on left/right screen edge when menu swipe opening is initiated, default: 30
  • slightlyOpenWidth - (integer, in px) - width of slightly open menu. Menu is opened slightly on tap event within initialTapAreaWidth to the edge, default: 20
  • slightlyOpenAfter - (integer, in ms) - time delay after which menu is slighlty opened if it is still closed, default: 300

Content Backdrop

If you want to add backdrop to the rest of the layout while menu opening, then just place {{content-backdrop}} component after {{#side-menu}} component.



  • menuId - (string), id of controlled menu, default: "default"

Side Menu Toggle

Like a button component to toggle menu.

You can use default toggle button consist with some toggle bars


You can use your own design block.

  <span class="glyphicon glyphicon-menu-hamburger"></span>

You can create a custom one by extending the main component.

import SideMenuToggle from "ember-side-menu/components/side-menu-toggle";
export default SideMenuToggle.extend({
    tagName: "button",
    classNames: ["navbar-btn", "btn", "btn-link", "pull-left"],


  • side - (string), which side of screen your menu toggle takes. Possible values: ["left", "right"], default: "left"
  • menuId - (string), id of controlled menu, default: "default"

Side Menu Link To

Works like a standard {{link-to}} helper, but also closes the menu.

{{#side-menu-link-to "new"}}
  New Event


  • menuId - (string), id of menu which should be closed when clicking, default: "default"

Using multiple side menus

There is a possiblity to declare more instances of side menu components, and control them separately. Default menu id is default and it could be omitted, if you want to use more than one instance of side-menu you should not forget about setting relevant menuId for connected menu components.

{{#side-menu side="left" id="leftMenu"}}
  Left Menu
{{#side-menu side="right" id="rightMenu"}}
  Right Menu
{{side-menu-toggle menuId="leftMenu"}}
{{side-menu-toggle menuId="rightMenu"}}
{{content-backdrop menuId="leftMenu"}}
{{content-backdrop menuId="rightMenu"}}

Side Menu Service

There is an available sideMenu service to control the menu.

export default Ember.Route.extend({
  sideMenu: Ember.inject.service(),
  actions: {
    openSideMenu() {


  • open(menuId='default')
  • close(menuId='default')
  • toggle(menuId='default')


For backward compability there is a possiblity to control or check default menu properties directly on service object.

  • isOpen (boolean)
  • isClosed (boolean)
  • isSlightlyOpen (boolean)
  • progress (number) 0-100

When using mutliple menus or changing default menuId then menu's state is held in menus object.

For example to get isOpen property for menu with id sampleMenu we can use this.get("sideMenu.menus.sampleMenu.isOpen".



Package Sidebar


npm i ember-side-menu

Weekly Downloads






Unpacked Size

26.9 kB

Total Files


Last publish


  • tsubik