Drag and drop for Svelte 5
Sortable lists, boards and trees from one attachment: nested zones, touch, keyboard and screen reader support. You own the items, the library proposes the changes.
pnpm add @lukez/svelte-dnd - Item 1
- Item 2
- Item 3
- Item 4
- Item 5
What you get
Any layout
Vertical, horizontal or grid lists. The zone does not care about the shape of its container.
Nested zones
Draggable containers with draggable items inside, like the columns and cards of a board.
Typed zones
Give zones a type to define what can be dropped where, or let every zone accept every item.
Pointer, touch and keyboard
One drag model for the mouse, touch screens and the keyboard, with auto-scroll near the edges.
Accessible
ARIA attributes, instructions and live announcements for screen readers, which you can translate.
Small and flexible
No dependencies. Animate with flip, use drag handles, copy on drag, or run zones in iframes and popup windows.
Make your first list draggable
Install the package and have a sortable list in a few lines.