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.
Composition
Render state-aware item content with useDndGridItemState.
How it works
Grid items often need to know whether they are currently being dragged or resized so they can dim, show a handle, or swap in a live readout. The useDndGridItemState hook gives a child access to its own item and interaction state without threading props down from the grid.
The cells here render their coordinates while dragging and a label the rest of the time. Because the hook reads from context, the component can sit at any depth inside the cell, which keeps the grid free of render-prop plumbing.
Installation
npx shadcn@latest add https://blode.co/dnd-grid/r/composition-example.jsonPublished with Edda