# useDragReorder

ONE reorder behavior for visible lists: HTML5 drag with a private MIME type (card drags never trigger file-drop zones), axis-free drop edges, and the keyboard path (moveBy ±1, bind ⌥↑/⌥↓).

Install: `npx candlelight-ds add use-drag-reorder`

Category: hook · Grammar: G9

## Use when

Reordering rows/cards within one visible list.

## Don't use when

Moving items BETWEEN collections (picker/⌘K, per G9) or file-drop zones.

## States

- dragging
- drop target before/after edge

## Keyboard

- `⌥↑/⌥↓` — moveBy(id, ±1) — the a11y path is the same code path

## Acceptance tests

- A file drag never reorders; a card drag never opens a drop zone (private MIME).
- The drop edge follows the axis the two items actually differ on — rail, list, and grid share one hook.

## Files

- hooks/useDragReorder.ts

npm dependencies: none

Rendered twin: https://candlelight-docs.vercel.app/components/use-drag-reorder · Full spec: https://candlelight-docs.vercel.app/spec.md
