Feature Library

Drag to reorder lists

0.17 CPU ms
A still of the Drag to reorder lists demo
Still
The live demo starts when it’s in view.Drag an item (on touch, hold it first) · or focus one and press Space, then the arrows · switch examples at the top

Reorder a list, move cards between the columns of a board, or rearrange a grid.

What it costs a frame

0.17 ms
GPU
not used
CPU, median
0.17 ms
CPU, 95th pct
1.05 ms
Draw calls
0
Weight
Light

Measured 7 November 2026 on 13th Gen Intel(R) Core(TM) i9-13900H, Chrome 156, 1920×1080 at 1×. 600 frames × 3 rounds, median kept. What ran: Measured with the demo dragging by itself: synthetic pointer events lift an item, carry it over 40 frames to another place and drop it, then rest 20 frames, going round the to-do list, the board (across its columns) and the card grid. Each frame moves the copy, finds the gap’s place and, when it changes, slides the others (FLIP). Nothing runs between drags. Phones: tiers are being measured next.

On every machine it was measured on
MachineGPU msCPU msCPU p95
unknown GPU · 13th Gen Intel(R) Core(TM) i9-13900Hreference · measuring toolnot timed0.171.05
apple · Apple A19 Proin a browser tab · 16 November 2026not timed0.302.38
Intel Arc 140V (Xe2-LPG) · Intel Core Ultra 7 258Vin a browser tab · 15 November 2026not timed0.231.19

Bars against one 16.7 ms frame. A browser-tab run is timed in a visible tab without the tool’s scripted input, so read it as close, not exact.

What it needs

Renders with
DOM and CSSPlain DOM and CSS: every current browser.
Your browser
Runs hereNo WebGPU needed
Depends on
NothingNo other packages

What it’s for

  1. To-do lists and playlists
  2. Kanban boards
  3. Photo and card grids
  4. Settings that set a priority order
  5. Menus and tabs people arrange themselves

Pitfalls, in brief

  1. Import drag-reorder.base.css, then drag-reorder.css (or your own look instead).
  2. The copy under the pointer is position: fixed inside the list (so your item styles apply).
  3. Every list gets a non-passive touchmove listener, so a lifted finger can stop the page scrolling.
  4. Items are found among the container’s direct children.
  5. With moveDom: false (React, Vue, Svelte) the DOM is put back before onReorder: render the new order from your state in it, or the framework and the module disagree about where the nodes are.
3 more in brief
  1. Checkboxes, links, buttons and fields inside an item never start a drag (the ignore selector).
  2. Pointer drags announce only the lift, the drop and a cancel; moving by keyboard announces every step.
  3. A lifted keyboard item that loses focus (Tab, a click elsewhere) is put back: a move only counts once it is dropped.
8 pitfalls in full, the hook-up guide, the module source and its tests come with the part.

Where it comes from

Written for the library. Fully custom code.

FLIP, Paul Lewis: First, Last, Invert, Play: how the other items slide to their new places. Written here from scratch.

Jesse Hausler, “4 Major Patterns for Accessible Drag and Drop” (2017): The idea of saying each step aloud (lifted, moved to a position of a total, dropped, cancelled) for people who cannot see the drag.

react-beautiful-dnd (Atlassian): The keyboard model this follows: Space to lift and drop, the arrows to move, Escape to cancel. No code from it.

WAI-ARIA Authoring Practices Guide (W3C): One Tab stop for a list, the arrow keys moving inside it (roving tabindex), and the tabs pattern in the demo.

drag and dropsortablereorderkanbangridfliptouchlong presskeyboardauto-scrolllive regionaccessibilityrtldomcssno dependencies

Near it in the frame