Skip to content

Instantly share code, notes, and snippets.

@acoyfellow
Created July 13, 2020 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save acoyfellow/c35a767d3559efb5f0fce7ad744eb7fc to your computer and use it in GitHub Desktop.
Save acoyfellow/c35a767d3559efb5f0fce7ad744eb7fc to your computer and use it in GitHub Desktop.
Svelte + SortableJS
<script>
 import Sortable from 'sortablejs';
 import { onMount } from "svelte";
 let el;
 onMount(async () => {
 Sortable.create(el, { /* your sortable options here */ })
 });
</script>
<ul this={el}>
 <li>Reorder Me</li>
 <li>And me!</li>
</ul>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment