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.
Local storage
Persist layout to local storage and restore on load.
How it works
Because the grid is controlled, persistence is entirely yours to arrange: serialise the layout you receive from onLayoutChange and hydrate from storage on mount. This example reads and writes localStorage so an arrangement survives a reload.
The one thing to watch is hydration. Reading storage during the first render diverges from what the server produced, so the read happens in an effect and the stored layout is applied afterwards. The SSR guide covers the same problem in more detail.
Installation
npx shadcn@latest add https://blode.co/dnd-grid/r/localstorage-example.jsonPublished with Edda