Skip to content

Repository files navigation

solid-sortablejs

Solid SortableJS

Easily sort your list. solid-sortablejs is using the SortableJS library to sort your list.
This library is in WIP

Quick start

Install it:

npm install solid-sortablejs

Use it:

importSortablefrom"solid-sortablejs";import{createStore}from"solid-js/store";import{JSX}from"solid-js";constApp=()=>{constitemStyles: JSX.CSSProperties={"user-select": "none",background: "green",padding: "10px","min-width": "100px",margin: "5px","border-radius": "4px",color: "white"};constcontainerStyles={display: "inline-block",background: "gray",padding: "10px","border-radius": "4px"};const[items,setItems]=createStore([{id: 0,name: 0},{id: 1,name: 1},{id: 2,name: 2},{id: 3,name: 3},])return(<divstyle={containerStyles}><SortableidField="id"items={items}setItems={setItems}>{item=><divstyle={itemStyles}>{item.name}{Math.random()}</div>}</Sortable></div>);};

About

No description, website, or topics provided.

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages