React Resizable Panels

Resizable, draggable panel group layouts for React with keyboard accessibility and SSR support built in

Library
npm
v4.14.8
5,424 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
87 /100 Excellent
Development Activity 96
Maintenance 100
Community 60
Maturity 52
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
87 /100 Excellent
Architecture 90
Code Quality 88
Innovation 85
Learning Curve 85

react-resizable-panels gives React applications a Group/Panel/Separator primitive for building resizable split-pane layouts — code editors, dashboards, admin panels, and file browsers with adjustable columns. Panels register with a shared per-group store that computes flex-based sizing from ResizeObserver measurements, so layouts stay correct across window resizes, conditional panel mounting, and nested groups without manual pixel math.

Built by Brian Vaughn (formerly of the React core team), the library ships draggable separators with full keyboard support, persisted layouts via a pluggable storage interface, collapsible panels with expand/collapse callbacks, and first-class server-side rendering — a common pain point for percentage-based layout libraries. It has no runtime dependencies beyond React itself and includes official integration examples for Next.js, Vite, and Vike.

What You Get

  • Group, Panel, and Separator components composing into horizontal or vertical resizable layouts, including nested groups
  • Draggable separators with full keyboard support (arrow keys, Home/End) and correct ARIA attributes for accessibility
  • Panel size constraints in percent, pixels, em, rem, vh, or vw, plus collapsible panels with expand/collapse callbacks
  • A pluggable LayoutStorage interface for persisting and restoring panel layouts (e.g. to localStorage) across sessions
  • Server-side rendering support that avoids the layout-shift problems common to percentage-based split-pane libraries
  • Imperative handles (useGroupRef, usePanelRef) for programmatic resize, collapse, and expand control outside of props

Common Use Cases

  • Code editor and IDE-style layouts with resizable file trees, editor panes, and terminal/output panels
  • Admin dashboards and data tools where users adjust the width of a sidebar, table, or detail panel
  • Documentation or reference sites with a resizable navigation sidebar next to scrollable content
  • Multi-pane comparison views (diff viewers, before/after previews) where panel proportions need to be user-adjustable

Under The Hood

Architecture — The library centers on a single global, per-document mutable store (lib/global/mutable-state/groups.ts, mountGroup.ts) rather than React state for hot-path layout data. Each Group registers its DOM element with a shared ResizeObserver on mount (mountGroup.ts); the observer recalculates panel constraints and a flex-grow-based layout whenever the group or a panel resizes, then pushes updates to subscribers via useSyncExternalStore. Drag interactions are handled by document-level pointer/keyboard listeners (global/event-handlers/) that compute hit-regions between separators and adjacent panels (calculateHitRegions.ts) and adjust layout deltas (adjustLayoutForSeparator.ts) without triggering React re-renders until a frame is due. This keeps dragging performant even with many panels, at the cost of a more complex mental model than a typical prop-driven React component.

Tech Stack — Pure TypeScript with React 18/19 as a peer dependency and zero runtime dependencies; builds with Vite (vite-plugin-dts for type declarations) targeting both CJS and ESM outputs (dist/react-resizable-panels.cjs / .js). The docs/demo site in src/ uses Tailwind CSS v4, Zustand, and React Router, but none of that ships in the published package. Official framework integrations for Next.js, Vite, and Vike live under integrations/ with their own Playwright end-to-end test suites.

Code Quality — 29 .test.ts/.test.tsx files (roughly 330 individual test cases) cover the core layout math (calculateDefaultLayout, validatePanelGroupLayout, adjustLayoutByDelta), DOM geometry helpers, and component behavior via Vitest and Testing Library. Code is organized into clear components/, global/, hooks/, and utils/ layers with small, single-purpose files, consistent TypeScript typing throughout, and an internal assert() helper used to fail loudly on invariant violations (e.g. duplicate panel ids) rather than degrade silently.

API Design — The public surface is intentionally small: three components plus a handful of hooks (useGroupRef, usePanelRef, useDefaultLayout, useGroupCallbackRef, usePanelCallbackRef) and typed callbacks (onLayoutChange, onResize). Size props accept plain numbers or unit-suffixed strings ("33%", "200px", "50vh") rather than requiring separate props per unit, and every rendered element carries a data-testid for easy testing. The one area with real learning cost is the global-store architecture: it’s invisible in simple layouts but surfaces once consumers reach for imperative handles or custom layout persistence.

Used by 81 apps in this directory

TypeScript
91%
Apache 2.0

Helicone

AI Development · Analytics · Monitoring

6,235

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
74
Repo Health
81
Technical
65
Dependency
Built with
TypeScript 91%
Updated 6 days ago
TypeScript
95%
AGPL 3.0

HeyForm

Forms Surveys · No Code Platforms

9,048

Open-source conversational form builder with AI generation, conditional logic, and 30+ integrations — self-host with full data ownership.

View details
86
Repo Health
67
Technical
67
Dependency
Built with
TypeScript 95%
Updated 6 days ago
TypeScript
99%
MIT

GraphQL Hive

Developer Tools · Devops · Monitoring

483

Open-source GraphQL schema registry and observability platform with breaking change detection, federation support, and CI/CD integration for teams of any size.

View details
90
Repo Health
81
Technical
68
Dependency
Built with
TypeScript 99%
Updated 1 weeks ago
TypeScript
55%
Other

Jaaz

AI Agents · AI Design Tools

6,721

Open-source AI creative agent that turns visual sketches and canvas gestures into images and videos — no text prompts required.

View details
45
Repo Health
59
Technical
71
Dependency
Built with
TypeScript 55%
Python 34%
JavaScript 10%
Updated 8 months ago
Rust
56%
Other

Jan

AI Assistants

45,052

Run LLMs 100% locally with full privacy, or connect to cloud AI — your machine, your data, your control.

View details
90
Repo Health
81
Technical
65
Dependency
Built with
Rust 56%
TypeScript 40%
Updated 6 days ago
TypeScript
63%
Apache 2.0

Laminar

AI Development · Monitoring

3,434

Open-source observability platform purpose-built for AI agents — trace, evaluate, debug, and monitor at scale with SQL access and real-time replay.

View details
86
Repo Health
76
Technical
65
Dependency
Built with
TypeScript 63%
Rust 35%
Updated 6 days ago
TypeScript
96%
Other

Langfuse

AI Development · Monitoring

36,276

Open source AI engineering platform for LLM observability, prompt management, evaluation, and debugging — self-host in minutes or use Langfuse Cloud.

View details
92
Repo Health
81
Technical
65
Dependency
Built with
TypeScript 96%
Updated 6 days ago
TypeScript
96%
AGPL 3.0

Libra AI

AI Development · No Code Platforms

1,695

Open-source AI-powered platform that generates and deploys full-stack web applications from natural language prompts, built natively for Cloudflare Workers.

View details
31
Repo Health
71
Technical
68
Dependency
Built with
TypeScript 96%
Updated 1 years ago
TypeScript
85%
MIT

LibreChat

AI Assistants · Developer Tools

46,236

Unite every major AI model in one self-hosted chat platform with agents, code execution, MCP tools, and enterprise authentication.

View details
93
Repo Health
81
Technical
62
Dependency
Built with
TypeScript 85%
JavaScript 14%
Updated 6 days ago

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