Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ampersand-drawer-view

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ampersand-drawer-view

Ampersand view class for hamburger drawer-like layouts

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

ampersand-drawer-view

Ampersand view class for hamburger drawer-like layouts. Inspired by Polymer's core-drawer-panel element

browser support

Install

npm install ampersand-drawer-view --save

Usage

// Soon. Look at tests for examples, for now.

var View = require('ampersand-view');
var DrawerView = require('ampersand-drawer-view');
var drawerView;

var DrawerPanel = View.extend({
  template: '<div>Drawer Panel</div>'  
});

var MainPanel = View.extend({
  template: '<div>Main Panel<br><button>Open Drawer</button></div>';
  events: {
    'click button': 'openDrawer'
  },
  
  openDrawer: function (e) {
    e.preventDefault();
    
    drawerView.openDrawer();
  }
});

 drawerView = new DrawerView({
  forceNarrow: true,
  subviews: {
    drawer: {
      view: new DrawerPanel(),
      width: 300,
      animationSpeed: 100
    },
    main: {
      view: new MainPanel(),
    }
  }
});

document.body.appendChild(drawerView.el);

API

(Coming soon. Look at tests for now)

Run Tests

npm install
npm test

Keywords

FAQs

Package last updated on 15 Nov 2014

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc