@anil-labs/dnd-core
v0.1.1
Published
Zero-dependency drag & drop engine — sortable lists, cross-list groups, clone, multi-drag, swap mode, keyboard a11y, FLIP animation and autoscroll, built on Pointer Events.
Downloads
419
Maintainers
Readme
@anil-labs/dnd-core
Zero-dependency drag & drop engine — sortable lists, cross-list groups, clone, multi-drag, swap mode, keyboard a11y, FLIP animation and autoscroll, built on Pointer Events.
import { createSortable } from '@anil-labs/dnd-core'
import '@anil-labs/dnd-core/styles.css'
createSortable(document.querySelector('#list'), {
group: 'tasks',
animation: 200,
onEnd: ({ oldIndex, newIndex }) => console.log(oldIndex, '→', newIndex),
})Framework bindings: @anil-labs/dnd-react · @anil-labs/dnd · @anil-labs/dnd-svelte · @anil-labs/dnd-solid · @anil-labs/dnd-element
MIT © Er. Anil Kumar Thakur
