Installnpx shadcn@latest add https://motion-lexicon.pages.dev/r/primitive-drag-to-reorder.json
- Purpose
- Keep the picked item, placeholder, and final drop location clear during list reordering.
- Trigger
- Trigger from pointerdown on a drag handle or a keyboard pickup command.
- Interruptibility
- Allow cancellation back to the origin at any time, updating the placeholder live as the target changes.
- Reduced motion
- Remove follow-pointer animation and use pickup state, target highlighting, and an immediate reorder result.
drag-to-reorderDrag to reorderDragging an item changes its list position while surrounding items animate toward their prospective slots.
dragDragPointer movement directly updates an object's position from grab until release.