hyperdom-draggabilly

1.0.0 • Public • Published

hyperdom-draggabilly

A hyperdom component that makes elements draggable using draggabilly.

Demo

Example

var hyperdom = require('hyperdom');
var draggable = require('hyperdom-draggabilly');
var h = hyperdom.html;
 
function render(model) {
  return h('.page',
    draggable(h('.red', 'Animal')),
    draggable({ grid: [20, 20] }, h('.green', 'Vegetable')),
    draggable({ axis: 'x' }, h('.blue', 'Mineral'))
  );
}
 
hyperdom.append(document.body, render, {});

License

MIT

Package Sidebar

Install

npm i hyperdom-draggabilly

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • joshski