CLI setup for DnD code on this page
If you copy code from the Snippet or Component tabs, run the command below first. It scaffolds AfnoUI, installs the pointer-event DnD primitives at components/dnd/*, and pulls the runtime deps the snippets import (lucide-react, clsx, tailwind-merge).
Alternatively, install a ready-made demo with afnoui add dnd/<variant>. That command pulls the DnD primitives and the variant's example file (under dnd/<variant>/, a sibling of components/) in one go — you don't need to run the init step separately.
Install with:
npx afnoui init --dnd Custom Pointer DnD
Trash zone
Drop a row onto the trash to delete it. Trash zone reacts on hover.
delete on drop
zone state
scaling
Install with:
npx afnoui add dnd/trashTrash zone
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Drop here to delete0 removed