JSPM

vdom-sidebar

0.0.6
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q44151F
  • License ISC

virtual-dom sidebar component

Package Exports

  • vdom-sidebar

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vdom-sidebar) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

vdom sidebar

virtual-dom sidebar component

install

$ npm install vdom-sidebar

example

var createElement = require('virtual-dom/create-element');
var Sidebar = require('vdom-sidebar');

var items = {
  examplePage: { href: '/example', name: 'Example' },
  anotherPage: { href: '/another-page', name: 'Another Page' }
};

var sidebarState = Sidebar({
  items: items
});

var virtualEl = Sidebar.render(sidebarState);
var el = createElement(virtualEl);

document.getElementById('content').appendChild(el);

demo

https://1b2b483006caf4a3a131e4ab0150fcec25b38e7d.htmlb.in