# ReorderList

Rearrange a sequence while each item keeps its identity.

- Family: Interaction, imported from `mizu-ui` or `mizu-ui/interaction`
- Docs: https://mizu.user64bit.world/components/reorder-list
- Source: https://github.com/0xuser64bit/mizu/blob/main/packages/mizu/src/interaction/ReorderList.tsx

## Usage

```tsx
"use client";

import { useState } from "react";
import { ReorderList } from "mizu-ui";

export function Example() {
  const [items, setItems] = useState([
    { id: "a", label: "Verify types", description: "Catch incompatible props" },
    { id: "b", label: "Run checks", description: "Exercise behavior" },
    {
      id: "c",
      label: "Review the browser",
      description: "Confirm the real interaction",
    },
  ]);
  return (
    <ReorderList label="Release order" items={items} onReorder={setItems} />
  );
}
```

## Copy it with the shadcn CLI

```sh
npx shadcn@latest init 0xuser64bit/mizu/preset # once, where there is no components.json
npx shadcn@latest add 0xuser64bit/mizu/reorder-list
```

## Props

- `items`: `ReorderEntry[]`. Stable id, label and optional description.
- `onReorder`: `(items: ReorderEntry[]) => void`. Persist the new full ordering.
- `label`: `string`. Sequence name.

## Accessibility

A real ordered sequence. Handles support pointer dragging and up/down keys; separate move buttons offer a touch-friendly alternative. Boundaries disable invalid moves.

## Motion

Motion layout retains identity; reduced motion uses zero-duration settling.
