node package manager

hyperdom-draggabilly

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