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.
Breakpoint-aware grid layout component.
import { ResponsiveDndGrid } from "@dnd-grid/react";Use ResponsiveDndGrid when you need breakpoint layouts. For a single layout,
use DndGrid. If you already have a measured
width, pass width directly.
layoutsResponsiveLayoutsBreakpoint → layout map. Missing layouts are derived from the nearest larger breakpoint (default behavior).
childrenReactNoderequiredGrid items; each child key must match a layout item id.
widthnumberOptional container width in pixels. When provided, measurement is skipped.
measureBeforeMountbooleanDefault: trueDelay rendering until the container width is measured.
initialWidthnumberDefault: 1280Width value used before measuring when rendering early.
containerPropsHTMLAttributes<HTMLDivElement>Props applied to the measurement wrapper.
breakpointsBreakpointsBreakpoint map, defaults to lg, md, sm, xs, xxs.
colsBreakpointColsColumn count per breakpoint.
gapResponsiveSpacingDefault: 10Gap per breakpoint (number or spacing object).
containerPaddingResponsiveSpacing | nullDefault: nullPadding per breakpoint (or null to use gap).
defaultLayoutsResponsiveLayoutsUncontrolled initial layouts per breakpoint.
compactorCompactorCompaction strategy used for layout generation and collisions.
missingLayoutStrategy"derive" | "warn" | "error" | "empty"Control how missing breakpoint layouts are handled.
onBreakpointChange(bp, cols) => voidFires when the active breakpoint changes.
onLayoutsChange(layouts) => voidFires when any breakpoint layout changes.
onLayoutChange(layout, layouts) => voidFires when the active breakpoint layout changes.
onWidthChange(width, gap, cols, padding) => voidFires on width or breakpoint configuration changes.
ResponsiveDndGrid supports the same grid configuration, behavior, accessibility,
and styling props as DndGrid (e.g. rowHeight,
draggable, resizable, autoSize, slotProps, and callbacks).
Published with Edda