Browse components
Reorder List
A list you drag into a new order by its handles: the picked-up row lifts with a shadow while the others spring aside. Handles also move rows with the arrow keys, announced to screen readers.
Installation
npx shadcn@latest add @glint-ui/reorder-listFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/reorder-list.json
Usage
import { ReorderList } from "@/components/ui/reorder-list";
<ReorderList items={tasks} onChange={setTasks} label="Priorities" />Props
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | "Reorderable list" | Accessible name of the list. |
| items | ReactNode | — | Controlled order: { id, label, description?, leading? }[]. |
| defaultItems | ReactNode | — | Initial order when uncontrolled. |
| onChange | ReactNode | — | (items) => void, called with the new order. |
| className | string | — | Extra classes for the root element. |