plastiq-draggabilly

A plastiq component that makes elements draggable

Usage no npm install needed!

<script type="module">
  import plastiqDraggabilly from 'https://cdn.skypack.dev/plastiq-draggabilly';
</script>

README

plastiq-draggabilly

A plastiq component that makes elements draggable using draggabilly.

Demo

Example

var plastiq = require('plastiq');
var draggable = require('plastiq-draggabilly');
var h = plastiq.html;

function render(model) {
  return h('.page',
    draggable(h('.red', 'Animal')),
    draggable({ grid: [20, 20] }, h('.green', 'Vegetable')),
    draggable({ axis: 'x' }, h('.blue', 'Mineral'))
  );
}

plastiq.append(document.body, render, {});

License

MIT