Skip to content

shadcn-drag-and-drop

A Next.js demo of sortable pills of different widths, with native HTML5 and dnd-kit versions side by side.

shadcn-drag-and-drop.vercel.app

shadcn-drag-and-drop website screenshot
Added
GitHub stars
36
License
MIT
Price
Free

About

About shadcn-drag-and-drop

shadcn-drag-and-drop is a small Next.js project that shows two ways to reorder a list of pills. One uses the browser's native HTML5 drag and drop API. The other uses @dnd-kit/core and @dnd-kit/sortable with a line indicator that marks where the item will land. The pills have different widths based on their text, which is harder to sort than a column of equal rows.

There is no registry or package. Clone the repository, run npm install and npm run dev, and read the code to reuse it in your own project. The stack listed in the README is Next.js 15 with Turbopack, React 18, TypeScript and Tailwind CSS with shadcn/ui components. It is MIT licensed. It suits tag lists, filter chips and anything else that wraps onto several rows.

shadcn-drag-and-drop features

5 features

  • Native HTML5 drag and drop example
  • dnd-kit core and sortable example
  • Line indicator for the drop position
  • Pills sized to their content
  • Next.js 15, React 18 and TypeScript

What you can build with shadcn-drag-and-drop

3 use cases

  • Reordering tags or filter chips in a settings panel
  • Choosing between native drag and drop and dnd-kit
  • Adding a drop indicator to a wrapping sortable list

Pricing

Ship it with Pro

The directory is free. Pro adds 6,000+ blocks, 14 premium templates and the MCP server, so your AI editor installs them for you.

4.9/5 out of 5 · 150+ reviewsfrom 150+ founders and developers.

  • Secure checkout via Stripe
  • Code lives in your repo
  • Keep what you've shipped if you cancel
  • License terms

FAQ

Frequently asked questions

What shadcn-drag-and-drop is, how to install it, its license and its alternatives.

4.9 out of 5 from 150+ developers

Found your stack? Ship it.

6,000+ blocks, premium templates and MCP in every Pro plan. The directory stays free.

Get Pro