For AI agents: the documentation index is at llms.txt. Markdown versions are available by appending .md to any page URL, including this page's markdown.
For AI agents: the documentation index is at /dnd-grid/docs/llms.txt. Append .md to any page URL, or send Accept: text/markdown, for the Markdown version of that page.
For AI agents: the documentation index is at llms.txt. Markdown versions are available by appending .md to any page URL, including this page's markdown.
Drop external items into the grid.
Items do not have to originate inside the grid. This example makes an external palette draggable with the native HTML drag and drop API, then uses onDropDragOver to preview the incoming item's size and onDrop to commit it at the cell the pointer is over.
onDropDragOver returns the width and height the placeholder should take, so the grid can reflow underneath the cursor before the user commits. That preview is what makes an external drop feel like part of the grid rather than an append.
npx shadcn@latest add https://blode.co/dnd-grid/r/drag-from-outside-example.jsonimport { DragFromOutsideExample } from "@/components/dnd-grid-drag-from-outside-example";
export default function Page() {
return <DragFromOutsideExample />;
}Published with Edda