React-Grid-Layout adds draggable, resizable grid dashboards to React applications. It supports responsive breakpoints, saved layouts, and server-rendered setups without jQuery.
Overview
React-Grid-Layout implements a packing grid similar to older jQuery grid tools, but as React components with responsive behavior. Widgets can be dragged, resized, pinned as static items, and added or removed without rebuilding the entire layout.
Layouts can be stored and restored, with separate configurations per breakpoint when using the responsive mode. Positioning relies on CSS transforms, and packing can run vertically, horizontally, or be disabled for custom placement.
The modern v2 release is written in TypeScript and exposes hooks such as useContainerWidth, useGridLayout, and useResponsiveLayout. Configuration is grouped into focused options for grid sizing, drag handles, resize handles, positioning strategy, and compaction algorithms.
Optional extras include background grid rendering and fast compaction paths for large item counts. A legacy import path preserves the earlier flat prop API for existing codebases migrating gradually.
Key features
- Draggable and resizable grid items
- Responsive breakpoint layouts
- Serializable layout state
- Vertical and horizontal compaction
- TypeScript types and React hooks
- SSR-friendly measurement options
- Pluggable compaction and constraints
- Modular core and legacy imports
Use cases
- Customizable analytics dashboards
- Admin panels with movable widgets
- Design tools with grid canvases
- Responsive home-screen style layouts
- Persistent user workspace arrangements