Preet Suthar

Draggable List

Cards 46

About

A reorderable list component with drag and drop functionality.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Draggable List to your project and fits it to your theme.

Code

How Draggable List is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { DraggableList,DraggableItem } from "@/components/ui/draggable-list"
import { useState } from "react";

const Demo = () => {
  const [items, setItems] = useState([
    { id: "1", content: <DraggableItem>First Item</DraggableItem> },
    { id: "2", content: <DraggableItem>Second Item</DraggableItem> },
    { id: "3", content: <DraggableItem>Third Item</DraggableItem> },
  ]);
 
  const handleReorder = (newItems: DraggableItemProps[]) => {
    setItems(newItems);
    // Do something with the new order
  };
 
  return (
    <DraggableList
      items={items}
      onChange={handleReorder}
      className="max-w-sm w-full"
    />
  );
}

export {Demo}

Dependencies

More by Preet Suthar

View all
  • Modern & Stunning sign in

    Modern & Stunning sign in

    1.6K
  • Shining Text

    Shining Text

    1.6K
  • Magic Text

    Magic Text

    849
  • Toolbar

    Toolbar

    830
  • Hero 2

    Hero 2

    820
  • Typewriter Text

    Typewriter Text

    780
  • AI Chat Input

    AI Chat Input

    745
  • Full Screen Signup

    Full Screen Signup

    743

More in Cards

View all
  • Statistics Card 7

    Statistics Card 7

    294
  • Course Design Cards

    Course Design Cards

    1.1K
  • Interactive Tech Stack Bento Grid with Hover Effects

    Interactive Tech Stack Bento Grid with Hover Effects

    59
  • The Item one

    The Item one

    3
  • Stats cards with links

    Stats cards with links

    81
  • Statistics Card 2

    Statistics Card 2

    268
  • Card

    Card

    56
  • Weather Card

    Weather Card

    54