Draggable list re-ordering manager with smooth swap animations, drag handles, and touch screen support.
<link rel="stylesheet" href="https://cdn.get-set.it/gs-sortable/latest/gs-sortable.min.css"> <script src="https://cdn.get-set.it/gs-sortable/latest/gs-sortable.min.js"></script>
import Sortable from '@get-set/gs-sortable'; export default function App() { return ( <Sortable type="column" > <div className="item">Phase A: Discovery</div> <div className="item">Phase B: Core Development</div> <div className="item">Phase C: Refinement</div> </Sortable> ); }
| Option | Type | Default | Description |
|---|---|---|---|
| type | 'column' | 'row' | 'grid' | 'column' | List display layout configuration. |
| count | number | 3 | Matrix columns count (grid mode). |
| gap | string | '12rem' | Spaces between sort items. |
| allowOutOfBox | boolean | true | Permit drag items out of box boundary. |
| takeClone | boolean | false | Drag element duplicates. |
| animation | number | 200 | Reorder transition speed in ms. |
| disabled | boolean | false | Disable dragging triggers. |
Smooth visual slide swapping as children get dragged.
Restrict drag initiation to specific sub-elements.
Native touch-start listener loops for mobile lists.
Exposes clean array reordering indices on drop.