# FormKit Drag and Drop

> Data-first sortable lists in about 4 KB: your array is the source of truth and reorders as you drag.

Source: https://tastebase.ehsanulsiam.workers.dev/browse/formkit-drag-and-drop

free

Data-first sortable lists in about 4 KB: your array is the source of truth and reorders as you drag.

by FormKit (Sasha Milenkovic)[GitHub](https://github.com/formkit/drag-and-drop)[npm](https://npmjs.com/package/@formkit/drag-and-drop)

[visit](https://drag-and-drop.formkit.com/?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://drag-and-drop.formkit.com](https://drag-and-drop.formkit.com/?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [dnd-kit](https://tastebase.ehsanulsiam.workers.dev/browse/dnd-kit)

Accessible drag-and-drop toolkit for React: sortable lists, kanban boards, keyboard dragging.

no preview

### [Pragmatic drag and drop](https://tastebase.ehsanulsiam.workers.dev/browse/pragmatic-drag-and-drop)

Atlassian's tiny, framework-agnostic drag-and-drop built on the native HTML5 DnD API (powers Trello and Jira).

no preview

### [AutoAnimate](https://tastebase.ehsanulsiam.workers.dev/browse/auto-animate)

One line of code that animates children being added, removed or moved inside a parent.

no preview

### [Sonner](https://tastebase.ehsanulsiam.workers.dev/browse/sonner)

Opinionated toast component with stacking, swipe to dismiss and promise toasts; ports for Vue, Svelte, Solid and Angular.

## For your agent

##### Install

`npm i @formkit/drag-and-drop`

##### Use it for

- a sortable list or playlist with almost no setup
- moving items between two lists (todo / done)
- a Vue or Solid app that wants the same DnD API as React

##### Skip it when

- dragging a divider to resize split panes or panels: the kit's Resizable part (react-resizable-panels under shadcn/ui)
- keyboard and screen-reader dragging is required: use dnd-kit
- large boards with nested drop targets or cross-window drags: use pragmatic-drag-and-drop

##### What's inside17 free

- useDragAndDrop
- dragAndDrop
- Sortability
- Draggable
- Transferability
- Disable sort
- Accepts
- Drag Handles
- Drag Ignore
- Updating Config
- Multi Drag
- Drop or Swap
- Insert (experimental)
- Animations (experimental)
- Events
- Configuration
- Accessibility

##### Facts

**Frameworks**
react, vue, svelte, solid, angular, vanilla

**Styling**
unstyled

**Weight**
small

**Accessibility**
weak

**Maturity**
stable

**License**
MIT

**Price**
Free

##### Pairs with

[AutoAnimate](https://tastebase.ehsanulsiam.workers.dev/browse/auto-animate)

##### Alternatives

[dnd-kit](https://tastebase.ehsanulsiam.workers.dev/browse/dnd-kit)[Pragmatic drag and drop](https://tastebase.ehsanulsiam.workers.dev/browse/pragmatic-drag-and-drop)

[Compare FormKit Drag and Drop with its alternatives](https://tastebase.ehsanulsiam.workers.dev/alternatives/formkit-drag-and-drop-alternatives)

```
import { useDragAndDrop } from '@formkit/drag-and-drop/react'

const [ref, tapes] = useDragAndDrop(['Depeche Mode', 'Duran Duran', 'Kraftwerk'])

<ul ref={ref}>
  {tapes.map((tape) => <li key={tape}>{tape}</li>)}
</ul>
```

https://drag-and-drop.formkit.com

Loading website

[Visit](https://drag-and-drop.formkit.com/?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
