vue3-smooth-dnd is a specialized Vue 3 wrapper for the highly performant `smooth-dnd` library, providing components for intuitive drag-and-drop functionality within Vue applications. Currently at version 0.0.6, the package primarily focuses on maintaining compatibility with the underlying `smooth-dnd` library and fixing integration-specific bugs. While release cadence is not formally established, updates appear to be driven by reported issues. Its key differentiator lies in directly porting the well-regarded Vue 2 `vue-smooth-dnd` wrapper to the Vue 3 ecosystem, aiming for a seamless transition for developers familiar with the original. It offers a robust, highly customizable, and visually smooth solution for list reordering and item movement, distinguishing itself from simpler drag-and-drop solutions by leveraging `smooth-dnd`'s optimized animation and physics.
npm install vue3-smooth-dndVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to set up a basic draggable list, render items using `Draggable` components within a `Container`, and handle drag-and-drop events to update the list's order.
Refer to official Vue 3 documentation and adapt Vue 2 examples to Vue 3's best practices, especially concerning reactivity, component lifecycle, and global instance configuration.
Use exact version pinning in `package.json` (e.g., `"vue3-smooth-dnd": "0.0.6"`) and review changelogs carefully before upgrading.
Ensure that `v-for` keys are stable and unique. When modifying the underlying data array (`items` in the quickstart), always create a new array instance or use Vue's reactivity methods (e.g., `this.$set` in Options API or `Vue.set` for older Vue 2, though direct array manipulation is usually reactive in Vue 3 if a new array is assigned) to trigger proper updates.
This issue was specifically addressed in `v0.0.6`. Ensure you are on the latest patch version. If it persists, it may indicate a specific edge case in your component's lifecycle or complex nested drag-and-drop scenarios that need careful management of component unmounting and re-rendering.
Ensure `import { Container, Draggable } from "vue3-smooth-dnd";` is present in your script and that `components: { Container, Draggable }` is correctly declared in your Vue component options.