Created
July 13, 2020 10:45
-
-
Save acoyfellow/c35a767d3559efb5f0fce7ad744eb7fc to your computer and use it in GitHub Desktop.
Svelte + SortableJS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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