react-grid-layout

A responsive, draggable, and resizable grid layout system for React with breakpoints and zero jQuery.

Library
npm
v2.2.4
22,382stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
90/100Excellent
Development Activity92
Maintenance84
Community84
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
88/100Excellent
Architecture90
Code Quality88
Innovation85
Learning Curve70

React Grid Layout is a grid layout system for React that lets users drag, resize, and rearrange widgets on a responsive canvas. It powers dashboards and drag-and-drop editors at companies like Grafana, Metabase, Kibana, and BitMEX, offering breakpoint-aware layouts, bounds checking, and serializable state without any jQuery dependency.

Version 2 is a complete TypeScript rewrite with first-class types, React hooks (useContainerWidth, useGridLayout, useResponsiveLayout), a tree-shakeable modular architecture, and a framework-agnostic core of pure layout algorithms. A legacy entry point preserves 100% runtime compatibility with the widely used v1 flat-props API.

What You Get

  • A drop-in <ReactGridLayout> component that turns child elements into draggable, resizable grid widgets
  • Responsive breakpoint support with independent layouts per breakpoint and auto-generated fallbacks
  • React hooks (useContainerWidth, useGridLayout, useResponsiveLayout) for width measurement and layout state
  • A framework-agnostic /core module exposing pure collision, compaction, and positioning algorithms
  • A /legacy entry point giving 100% runtime compatibility with the v1 flat-props API for painless migration

Common Use Cases

  • Building customizable, user-rearrangeable analytics dashboards
  • Creating drag-and-drop page or form builders
  • Persisting and restoring per-user widget layouts across sessions and screen sizes
  • Composing responsive widget grids that reflow across breakpoints

Under The Hood

Architecture The library is organized into layered modules under src/: a pure, React-free core/ (collision.ts, compactors.ts, constraints.ts, layout.ts, position.ts, calculate.ts, responsive.ts) that implements collision detection, compaction, and grid-cell math; a react/ layer with the GridLayout, ResponsiveGridLayout, GridItem, and WidthProvider components plus hooks; an extras/ module for optional pieces like GridBackground and fast O(n log n) compactors; and a legacy/ wrapper reproducing the v1 flat-props surface. Grid items are positioned with CSS transforms (or absolute positioning via a pluggable position strategy), and dragging/resizing is delegated to react-draggable and react-resizable.

Tech Stack Written in TypeScript (57%) with remaining JavaScript, built with tsup into tree-shakeable ESM and CJS bundles with generated .d.ts types. Runtime dependencies are minimal: clsx, fast-equals, prop-types, react-draggable, react-resizable, and resize-observer-polyfill. React >= 16.3 is a peer dependency, with v2 targeting React 18+. Tooling includes Babel, Jest, ESLint (flat config), Prettier, Husky, and webpack for the examples site.

Code Quality The repository has an extensive Jest test suite under test/spec/ covering compactors, constraints, core functions, hooks, lifecycle, drop alignment, margin consistency, TypeScript component typing, and backward compatibility, plus benchmark tests. Code is strongly typed with a clean separation between pure algorithms and React bindings, and exported surfaces are deliberately curated (some internal helpers are intentionally not exported). This is a mature, well-tested codebase.

API Design The v2 API groups related props into focused config objects (gridConfig, dragConfig, resizeConfig, positionStrategy, compactor) rather than a flat prop soup, and pairs them with ergonomic hooks so container width and layout state are easy to wire up. Documentation is thorough: a large README with 20+ live demos, a migration guide, an RFC, and a CodeSandbox. The legacy wrapper lowers migration cost significantly. The main tradeoff is that the required width prop and breakpoint concepts impose a modest learning curve for newcomers.

Used by 26 apps in this directory

TypeScript
94%
MIT

Actual

Invoicing Finance

28,224

Local-first personal finance with envelope budgeting, end-to-end encryption, and multi-device sync — no subscription required.

View details
93
Repo Health
85
Technical
77
Dependency
Built with
TypeScript94%
Updated yesterday
TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,526

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
53
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated 9 months ago
JavaScript
99%
Other

ChartBrew

Analytics · Databases

4,041

Open-source reporting platform to build live dashboards from SQL, NoSQL, APIs, and SaaS tools with an AI assistant that creates charts from natural language.

View details
90
Repo Health
83
Technical
65
Dependency
Built with
JavaScript99%
Updated 6 days ago
TypeScript
98%
Other

Formbricks

Forms Surveys · Marketing · Analytics

12,790

Open-source experience management platform for in-app, website, email, and link surveys — privacy-first and fully self-hostable.

View details
93
Repo Health
81
Technical
73
Dependency
Built with
TypeScript98%
Updated today
TypeScript
97%
Other

GrowthBook

Developer Tools · Analytics · Monitoring

8,138

Open source feature flags, A/B testing, and warehouse-native experimentation that queries your existing data infrastructure—no data movement required.

View details
92
Repo Health
85
Technical
66
Dependency
Built with
TypeScript97%
Updated today
TypeScript
91%
Apache 2.0

Helicone

Monitoring · AI Development · Analytics

6,083

An open-source AI gateway and LLM observability platform that routes requests to 100+ models while logging cost, latency, and full traces for every call.

View details
62
Repo Health
81
Technical
66
Dependency
Built with
TypeScript91%
Updated 3 days ago
TypeScript
71%
Other

highlight.io

Developer Tools · Analytics · Monitoring

9,367

Open-source full-stack monitoring that unifies session replay, error tracking, logging, and distributed tracing so you can stop context-switching between tools.

View details
69
Repo Health
78
Technical
66
Dependency
Built with
TypeScript71%
Go16%
Updated yesterday
TypeScript
95%
MIT

HyperDX

Developer Tools · Analytics · Monitoring

9,841

Open source observability platform that unifies logs, traces, metrics, and session replays on ClickHouse — now the core of ClickStack.

View details
87
Repo Health
83
Technical
70
Dependency
Built with
TypeScript95%
Updated today
Python
63%
Other

Keep

Devops · Automation · Monitoring

12,224

The open-source AIOps and alert management platform that unifies 130+ monitoring tools into a single pane of glass with AI-powered correlation, deduplication, and workflow automation.

View details
91
Repo Health
79
Technical
67
Dependency
Built with
Python63%
TypeScript36%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search