react-resizable-panels offers Panel, PanelGroup, and Grid primitives so users can drag dividers to resize columns, rows, and nested workspaces in React applications.
Overview
The library models resizable application layouts with panel groups for horizontal or vertical splits, collapsible panes, and keyboard-accessible resize handles. A newer Grid and Cell API arranges two-dimensional workspaces where intersecting dividers resize both axes.
TypeScript types ship inside the published dist folder. Documentation on the project site covers imperative APIs, persistence of layout sizes, and testing identifiers on panel elements.
Components expose constraints such as min and max percentages, collapsed states, and callbacks when dragging starts or ends. Grids declare column and row track definitions with per-track size limits mirroring panel props.
Installation comes from npm; FAQs on the site address common integration questions for nested scroll areas and tabbed panel sets.
Key features
- Horizontal and vertical panel groups
- Collapsible pane support
- Keyboard-driven resize handles
- Two-dimensional Grid layout
- Per-panel min and max sizes
- Built-in TypeScript definitions
- Imperative layout control API
- Documented testing attributes
Use cases
- IDE-style split editors
- Mail clients with adjustable columns
- Dashboards with draggable sections
- Settings panes beside previews
- Nested admin layouts with tabs