Livewire Drag And Drop
An accessibility-first drag-and-drop utility for Livewire and Alpine.js. Built for WCAG 2.1 AA with full keyboard navigation and screen-reader support, it drops into the TALL stack via x-drag-context and x-drag-item directives.
v2.1.0
MIT License
★ 0
npm install @artisanpack-ui/livewire-drag-and-drop
$ npm install @artisanpack-ui/livewire-drag-and-drop
✓ Added to package.json
import LivewireDragAndDrop from '@artisanpack-ui/livewire-drag-and-drop';
<div x-drag-context><div x-drag-item>...</div></div>
What it does
Drag and drop, for everyone
Reorderable lists and kanban boards that work with a mouse, a touch screen, or a keyboard — and announce every move to screen readers.
Accessibility-first
Built to WCAG 2.1 AA, with ARIA attributes and screen-reader support.
Keyboard navigation
Arrow keys to move, Space or Enter to grab and drop, Escape to cancel.
Alpine.js directives
Native x-drag-context and x-drag-item directives for the TALL stack.
Livewire compatible
A drag:end event with the new order makes backend integration a one-liner.
Touch friendly
Works across desktop, tablet and mobile devices.
Lists & kanban
Perfect for reorderable lists, kanban boards and complex interfaces.
Get started
Install via npm or CDN
Register the plugin with Alpine, then wrap items in x-drag-context and mark each with x-drag-item.
npm
npm install @artisanpack-ui/livewire-drag-and-drop
CDN
<script src="https://unpkg.com/@artisanpack-ui/livewire-drag-and-drop@latest/dist/livewire-drag-and-drop.js"></script>
Requirements
What you need
| Requirement | Detail |
|---|---|
| Alpine.js | 3.x |
| Install | npm or CDN |
| Browsers | Chrome, Firefox, Safari, Edge (modern) |
| Distributed on npm as @artisanpack-ui/livewire-drag-and-drop. v2.0.0 switched drag:end to an orderedIds payload. | |
Add drag and drop with Livewire Drag and Drop
Accessible reordering for your TALL-stack app in one install. Free and open source under the MIT license.
