diff --git a/README.md b/README.md index c95740711..4fe4ec815 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,7 @@ Demo: http://sortablejs.github.io/Sortable/ * React * [ES2015+](https://github.com/SortableJS/react-sortablejs) * [Mixin](https://github.com/SortableJS/react-mixin-sortablejs) + * [Svelte](#svelte) * [Knockout](https://github.com/SortableJS/knockout-sortablejs) * [Polymer](https://github.com/SortableJS/polymer-sortablejs) * [Vue](https://github.com/SortableJS/Vue.Draggable) @@ -640,6 +641,69 @@ Sortable.create(el, { --- + +### Svelte +Demo: https://svelte.dev/playground/498c42e864bb45c5ac05473a1718d6fb?version=5.50.3 + +```svelte + + +
{ + console.log(sortable.toArray()); + }, + get: (sortable) => { + return sortable.toArray(); + }, + }, + })} +> + {#each [1, 2, 3, 4, 5] as item} +
{item}
+ {/each} +
+``` + + +--- + + ### Bootstrap Demo: https://jsbin.com/visimub/edit?html,js,output