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[] | - | List items to reorder. |
| onReorder | function | - | Called with the new order. |
| className | string | - | Extra classes for the outer card. |