Back to Components
Drag & Drop Reorder
A smooth, customizable, and accessible sortable list for modern applications.
Preview
- DesignCreate beautiful experiences
- DevelopBuild with modern tools
- TestEnsure everything works
- DeployLaunch to the world
- IterateMake it better
Installation
Install the component using the CLI.
npx shadcn@latest add https://shreyashtech.me/r/drag-drop-reorder.jsonUsage
Import the component:
import { DragDropReorder } from "@/components/drag-drop-reorder"Use it in your code:
<DragDropReorder />Props
| Property | Type | Default | Description |
|---|---|---|---|
| items | ReorderItem[] | - | Array of { id, title, description, icon, color } (controlled). |
| onReorder | function | - | Callback fired with the new order when dragging ends. |
| className | string | - | Additional classes applied to the outer card. |