hyperdom-draggabilly
v1.0.0
Published
A hyperdom component that makes elements draggable
Downloads
6
Maintainers
Readme
hyperdom-draggabilly
A hyperdom component that makes elements draggable using draggabilly.
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