svelte-sortable

0.1.0 • Public • Published

SVELTE-SORTABLE

A Svelte wrapper component for SortableJS.

Install

npm i -S svelte-sortable or yarn add svelte-sortable

Usage

<script>
    import Sortable from "svelte-sortable"
 
    let items = [
        "foo",
        "bar",
        "baz",
    ]
 
    function onChange() {
        //`items` are mutated
        console.log(items)
    }
 
</script>
 
<Sortable {items}
          let:item={item}
          on:change={onChange}>
    <div>
        {item}
    </div>
</Sortable>

Readme

Keywords

none

Package Sidebar

Install

npm i svelte-sortable

Weekly Downloads

3

Version

0.1.0

License

MIT

Unpacked Size

8.39 kB

Total Files

3

Last publish

Collaborators

  • progging