{"repo":"MaxLeiter/sortablejs-vue3","free":true,"listed":false,"github":"https://github.com/MaxLeiter/sortablejs-vue3","clone":"git clone https://github.com/MaxLeiter/sortablejs-vue3.git","description":"A thin wrapper around Sortable.js for Vue 3","language":"Vue","stars":414,"topics":["sortablejs","typescript","vite","vue","vue3","drag-and-drop","vue2"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"SortableJS-vue3 Demo npm This is a thin wrapper around the great SortableJS library. I had many issues migrating from Vue.Draggable to vue.draggable.next, and after briefly investigating I decided that it was too complicated and a smaller solution was the answer. This wrapper attempts to keep you as close to Sortable as possible. Why not use \\ ? - Vue.Draggable only supports Vue 2 - vue.draggable.next uses the Options API, has multiple open (and afaict useful) pull requests, and had weird bugs/side-effects when I tried and used it - shopify/draggable and vue-shopify-dragable seemed promising but they don't supported nested components Usage You can see a demo with more complete code at https://sortablejs-vue3.maxleiter.com. 1. Install the package: or 2. Import the component in your (or ): 3. Use the component: 4. The list and item-key props are necessary. The options prop is an object that can contain any SortableJS option. You can find a full list of them here: https://github.com/SortableJS/Sortable#options - The tag prop is optional and defaults to div . It's the HTML node type for the outer element of the included template/slot. Props - list ( Array , required): your data to list - itemKey ( string (item) = (string number Symbol) , required): The name of the key present in each item in the list that corresponds to a unique value (to use as the key ) - tag ( string , optional, default = \"div\" ): The element type to render as - options ( Object , false): the SortableJS option","default_branch":null,"files":null,"tree":[],"storefront":"/r/MaxLeiter","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/MaxLeiter/sortablejs-vue3/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}