npm / react-resizable-panels
react-resizable-panels
What changed in react-resizable-panels 3 to 4, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-04.
19 breaking5 deprecations104 new APIs and options7 performance29 behavior and defaults95 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initreact-resizable-panels 4257 changes
Breaking changes 18
Activating the selected tab of an expanded collapsible or floating tabset now collapses it and reports "collapse", unless the workspace is disabled.
The prop now applies to all tabs that aren't visible, including selected tabs in collapsed or covered tabsets, which are unmounted or hidden according to its setting.
The drop indicator is no longer a child of data-tab-panels, so selectors targeting it as a child of those panels should be updated.
The tab argument may be undefined when dragging a tabset without tabs, so callbacks that read it should check first.
In a Workspace without separators, pressing a tab at the tabset edge prioritizes resizing over dragging the tab.
If restoring a panel's most recent size would require collapsing another panel, expands to the largest size that fits instead, provided it is at least minSize.
useDefaultGridLayoutnow persists the requested layout instead of the constrained layout.useDefaultLayoutnow persists the requested layout instead of the constrained layout.Separator no longer retains focus after a drag.
Panel replaces the aria-disabled attribute with data-disabled.
Adds a new Group callback for layout changes.
Pointer-event layout changes trigger the callback only after the pointer is released, reducing callback frequency for tasks like saving layouts.
Persistent layouts no longer use PanelGroup autoSaveId directly.
PanelGroup was renamed to Group to align with the version 4 API.
PanelGroup was replaced by Group in version 4.
PanelResizeHandle was replaced by Separator in version 4.
useGroupRef replaces the imperative group ref type and creates a group reference.
usePanelRef replaces the imperative panel ref type and creates a panel reference.
Deprecations 5
Deprecated on the drag preview; the notes recommend opening popout windows from a button instead.
Deprecated because browsers do not reliably report where an external drag ends and may block popups opened then; use a button to open popout windows instead.
Deprecated along with onTearOff; the notes recommend opening popout windows from a button instead.
The previous callback remains supported but is marked deprecated.
The groupId parameter is deprecated in favor of id because the Group does not need a matching id.
New APIs and options 104
Add the size option to addTab for specifying the size when adding a tab.
Add the target option to addTab, allowing a tab to be added in a new tabset relative to another one.
The prop can now accept functions of the tabset, tab, or split being styled and its state, enabling styling based on data.
Add a prop that tells the workspace where a dragged tab came from; this information is passed to disableDrop and onModelChanged.
Add a prop that delays mounting a tab's content until the tab is first shown.
Add a prop that can block changes the user makes, such as closing a tab with unsaved changes.
Add the region option to ParentTabset.addTab for placing a tab in a specified region.
Add the size option to ParentTabset.addTab for specifying the size when adding a tab.
Add a method to set the sizes of a split's children by id, for example to apply a saved preset.
Use this attribute to opt elements in a Workspace tab out of selecting the tab or starting a drag when pressed.
Workspace can create tabs from browser drag-and-drop, including draggable elements or files.
Adds a reason used to report tabs or tabsets copied during drops.
Adds a Workspace prop so tabs dropped while Option on macOS or Ctrl is held are copied rather than moved.
Adds a Workspace prop so tabsets dropped while Option on macOS or Ctrl is held are copied rather than moved.
Adds a method for getting the ids of a tabset's tabs that are scrolled out of view.
Adds a selectTab method to useParentTabset.
Workspace can start dragging a new tab from outside the workspace, such as from a palette of widgets.
Adds a method for subscribing to changes in which tabset tabs are scrolled out of view.
Opens Workspace tabs in popup windows, copies the page's styles, and docks tabs back when the windows close.
Returns the ids of tabs in a tabset that are scrolled out of view, for uses such as an overflow menu.
The children, className, style, and title props of TabCloseButton, TabsetDragHandle, TabsetCollapseButton, and TabsetMaximizeButton can be functions of the component's state.
Adds a button that collapses or expands its containing tabset, exposes aria-expanded and aria-controls, and renders nothing when the action is unavailable.
Adds a button that maximizes or restores its containing tabset, exposes aria-pressed, and renders nothing when the action is unavailable.
Workspace supports floating tabsets, listed in the model's floating field. Create them with floatTab and floatTabset, collapse them with collapseTabset, and dock them with moveTabset.
TabDropTarget has a new edge variant without tabsetId; check for tabsetId before reading target.tabsetId.
The drag preview has this attribute while releasing the pointer would tear off the tab.
Keeps a workspace's drags within its copy of the application.
The callback receives source as local for workspace-internal drags or external for drags from another workspace in the group.
Enables dragging tabs and tabsets between workspaces in the same group, including across windows and application copies; transferred tabs keep their id and data.
Model changes caused by tearing off tabs or transferring them between workspaces use the new reasons tear-off and transfer.
Workspace calls this prop when a tab or tabset is dropped outside the window; returning true removes it and reports a tear-off model change.
The drag preview props receive an isTearOff flag while releasing the pointer would tear off the tab.
Adds an imperative method for getting the unused space in each tabset's tab list.
Adds a maximum height for Workspace tabset content areas, also available through updateTabset; maximum sizes require absolute units and may be ignored when no other split can take the remaining space.
Adds a maximum width for Workspace tabset content areas, also available through updateTabset; maximum sizes require absolute units and may be ignored when no other split can take the remaining space.
Adds a function that checks and tidies a model like the defaultModel prop and returns null for values that aren't models.
The mapTab option replaces saved tabs with the app's current versions or removes them, enabling restoration of layouts saved by older app versions.
Adds a method for subscribing to tab-list free-space updates, including from a toolbar rendered outside the Workspace.
Sets the tab list's unused space as a CSS custom property, updated before the browser paints.
Adds isCollapsedToFit to distinguish tabsets collapsed to fit from tabsets collapsed in the model.
Adds a hook that returns the unused space in each tabset's tab list, including negative values when tabs overflow.
Whether a tabset is collapsed is saved in the model.
A new method collapses a tabset.
A tabset with this new flag can collapse to just its header by dragging a separator past its minimum size or using collapseTabset; clicking a tab expands it.
The drag preview has this attribute, with a value of tab or tabset.
Elements within a collapsed tabset have this attribute.
A tabset being dragged has this attribute.
This new flag prevents dragging a tabset; a tabset also cannot be dragged if it contains a tab with this flag.
During a whole-tabset drag, the new tabset argument is set, and disableDrop is called for each dragged tab with the target that tab would be dropped at.
A new method expands a collapsed tabset.
A new imperative method supports moving tabsets.
A new prop supports rendering a tabset drag preview.
A TabsetDragHandle can be used to drag a tabset.
In recent selection mode, each tabset's recently selected tab IDs are saved in the model.
The hook now returns a collapse function.
The hook now returns an expand function.
The hook now returns an isCollapsed function.
The hook now returns an isCollapsed value.
The hook now returns an isCollapsible value.
The hook returns an isDragDisabled value to support tabset dragging.
This prop chooses the selected tab after the selected tab is closed or dragged to another tabset: the adjacent tab by default, or the tabset's most recently selected tab with recent.
Workspace classNames accepts a split entry for each split's Group, allowing its class to be customized.
Each split's Group now has a data-split attribute.
Each split's Group now has a data-split-id attribute.
Workspace styles accepts a split entry for each split's Group; its CSS gap adds space between tabsets and counts toward their minimum sizes.
Adds a prop for styling tabsets.
Adds an option to keep unselected tab content mounted by default, unmount it, or render it within a hidden React
<Activity>.Adds a prop for customizing empty tabsets.
Adds a prop for customizing tabs in a workspace.
Adds a prop for customizing tabset toolbars.
Adds an option for selected tabs' content to opt into server rendering.
Adds a component for tab customization.
Adds a hook for accessing the parent tab from content within a workspace.
Adds a hook for accessing the parent tabset from content within a workspace.
Adds a hook for accessing parent tabset state from content within a workspace.
Adds a hook for accessing parent tab state from content within a workspace.
Adds a hook for accessing the parent workspace from content within a workspace.
Adds a hook that returns the imperative API for an uncontrolled workspace.
Adds a component for rearrangeable tabsets that can be resized and maximized, with a serializable layout model and tab content that is not remounted when moved.
Access the nearest Grid, including its imperative API, without passing refs down; returns null outside a matching component.
Access the nearest Group, including its imperative API, without passing refs down; returns null outside a matching component. Within a Cell, returns the nearest Group outside of the Grid.
Access the nearest Panel, including its imperative API, without passing refs down; returns null outside a matching component.
onLayoutChangedmetadata now includesrequestedLayout, exposing the layout requested before constraints were applied.Adds cells that can span multiple columns and rows in resizable two-dimensional layouts.
Adds Grid components for resizable two-dimensional layouts with row and column size constraints.
Adds optional gridlines that can span subsets of tracks to avoid spanning cells.
Adds a hook for default grid layout behavior.
Adds a callback ref hook for grids.
Adds a ref hook for grids.
Panels now support a configurable collapse threshold.
Resize preview mode is now customizable.
The callback now receives meta information indicating whether resizing was triggered by direct keyboard or mouse input.
The hook can now save layouts only when directly triggered by user interactions.
Adds a prop to turn off the double-click size reset behavior.
Automatically migrates legacy layouts to version 4 format, easing upgrades for existing persisted layouts.
Adds a Panel prop that lets panels retain their current pixel size when the parent Group is resized.
Panel and Separator components can now be disabled.
Group, Panel, and Separator components now expose displayName for a better debugging experience.
The onResize callback now receives prevPanelSize, simplifying collapse and expand detection.
The GroupImperativeHandle type is now exported for developers to use in application code.
The PanelImperativeHandle type is now exported for developers to use in application code.
Group accepts groupRef for imperative access.
Panel accepts panelRef for imperative access.
useDefaultLayout provides defaultLayout and onLayoutChange for persistent layouts.
Performance 7
Panels without an onResize prop are no longer observed, improving resizing and dragging performance.
Dragging a Workspace tab only re-renders what changes, improving dragging performance.
Mount performance improves for groups with many panels by skipping redundant constraint recalculations and subscriber notifications when a Panel's disabled prop has not changed.
Available group size is calculated once per hit-testing pass instead of once per hit region.
Panel avoids unnecessary re-renders in response to mouse-hover state.
Panel now applies flex-grow inline instead of using a CSS variable on the parent Group, reducing forced reflow and improving rendering performance.
Debounces calls to storage.setItem by 150ms, reducing the frequency of storage updates.
Behavior and default changes 29
Workspace tabs and tabsets can be dropped at workspace edges beside other tabsets. These targets are enabled by default and can be disabled with disableDrop.
Development-only warnings are removed from production builds.
With a dragGroup, disableDrop is called when the drop target changes instead of on every dragover event.
The same indicator element can animate between tabsets; while the drag is outside any tabset's panels, it stays in place with no data-region attribute and opacity 0.
Dropping a tab or tabset onto an empty workspace now fills its tabset, keeping that tabset's id and data, instead of showing a half-size edge indicator.
In right-to-left layouts, dragging tabs inserts them where dropped, arrow keys move focus to the tab on that side, and edge drops place tabs or tabsets on the corresponding screen side.
The default tabset drag preview now appends the number of other dragged tabs after the selected tab's title; custom preview props and single-tab drags retain the previous preview.
Any element with this attribute can serve as a tabset drag handle.
Tabsets with this flag can be moved but not merged when dragged.
The callback now reports collapse and expand reasons.
Workspace tabsets can be dragged by empty header space or a drag handle. Dropping on an edge moves a tabset; dropping on a center or tab list merges its tabs into the target.
Workspace interactions support mouse, touch, and keyboard input.
Imperative resize, collapse, and expand calls and separator double-clicks now take or give space to the nearest panels that can absorb it on either side, preferring changes that do not collapse or expand other panels.
The imperative Panel API now supports non-percentage sizes.
Default overflow styles changed to support shadows.
Imperative Panel and Group APIs now explicitly override disabled status when resizing, supporting conditionally disabled groups.
Pre-collapsed panels expand when dragged past the halfway point, making collapse and expansion behavior more consistent.
Separator and Panel edge hit target size decreases by default and becomes configurable through a new Group prop.
Double-clicking a Separator resets its associated Panel to its default size when one is configured.
The hook now uses the new layout-change callback while retaining support for the old callback.
Drag interactions call event.preventDefault only for the primary button.
Group now applies default width, height, and overflow styles, which can be overridden with style.
The storage parameter now defaults to localStorage when undefined.
The hook now supports saving and restoring multiple Panel layouts.
Resizable panels can render into a different Window, such as a popup or frame, by accessing globals through the element's owner document.
Expanded support for fixed-size elements, allowing developers to use more fixed-size elements with the library.
Layout-change events are deferred when a Group is within a hidden DOM subtree, improving developer experience.
Size constraints now support pixels, percentages, REMs/EMs, and more.
Support for server-rendering, including Server Components, has been expanded.
Fixes and other changes 94
Fixes a Separator behind an open popover being draggable, including popovers rendered inside of the Group.
Tabs dropped at workspace edges lined by a collapsed tabset are added to that tabset; these targets have an index, so edge-based disableDrop checks do not reject them.
In a disabled workspace, clicking a tab or empty header space of a collapsed tabset no longer expands it; clicking a tab only selects it.
Moving a tab no longer reloads its iframes, pauses its media, or blurs focused elements in browsers that support moveBefore.
Panels and Grid tracks no longer resize unexpectedly when constraints or groupResizeBehavior change after the group has been resized.
Collapsed panels and Grid tracks now expand to their pre-collapse pixel size when the group was resized while they were collapsed.
Form controls, their labels, editable content, and elements with a form control role within a Workspace tab no longer select the tab or start dragging it when pressed. Use data-tab-ignore to opt other elements out.
A selected Workspace tab is scrolled into view when its tab list overflows.
Fixes panels drifting by a fraction of a pixel when using preserve-pixel-size with fractional panel sizes, caused by measuring a Group as the sum of rounded panel sizes.
Tab-list overflow attributes are now set correctly while the list is scrolled in right-to-left layouts.
In right-to-left layouts, the
leftandrightregions passed tomoveTabandmoveTabsetrefer to sides of the screen.Tab-list free space now keeps decreasing when the list is squeezed to 0px and updates when the header or toolbar changes size.
Tabsets now respect minimum and maximum sizes when model sizes do not fit their minimums; those that must collapse to fit are shown as collapsed, and the model remains unchanged.
For a collapsible tabset, its size is the size it expands to.
Workspace tabsets and splits now have element ids unique within the page, avoiding collisions with application elements or other workspaces.
Dragging a Workspace separator no longer ends after a few pixels when tabset header sizes change during resizing.
Fixes separator resize previews missing the separator's styles when its element was created by another window's document.
Fixes separators remaining in their hover state when the pointer moves onto an iframe in a Group rendered into another window.
Corrects separator and gridline movement when an ancestor has CSS zoom or a scale transform by converting pointer movements from screen pixels to layout pixels.
Declares the package side-effect-free so bundlers can remove unused components; an application importing only Group no longer includes Grid.
Fixes vh, vw, and em panel sizes to resolve against the panel's own window when a Group is rendered in another window.
Declared as an optional peer dependency so TypeScript can resolve React types under strict package linkers instead of silently typing props as any.
Releasing the pointer after dragging a boundary between panels without a Separator no longer clicks the element under the pointer.
Group and Grid setLayout(), and Panel resize(), collapse(), and expand() no longer validate against pixel-based constraints for the previous group size when called before the group's ResizeObserver runs.
Detached event targets are now treated as viable hit targets, preventing an error when a target is removed from the DOM during pointermove dispatch.
F6 and Shift+F6 navigation now skips disabled separators instead of trying to focus them.
Group, Panel, Separator, Grid, and Cell only render an explicit id or data-testid as data-testid.
An empty string id now behaves like an undefined id and falls back to useId.
Panel now correctly treats 0 as an explicit id value.
Errors from layout or resize callbacks no longer leave drags stuck or prevent other groups from updating; errors are re-thrown afterward.
Pointer events across documents no longer affect groups mounted in another document, and the resize cursor is limited to the active group's document.
Interrupted drags now end and commit the current layout instead of remaining active until the next pointer event.
Panels and separators are resorted before constraints are re-derived, fixing constraint calculations.
Constraint-induced layout changes no longer permanently alter the layout; the requested layout is restored when the constraint no longer applies.
Separator behind a modal dialog can no longer be dragged.
Panel ordering is fixed in environments with invalid offset values, such as JSDom.
The default layout is respected when an initially hidden group becomes visible.
Keyboard mappings are preserved for disabled separators, fixing the “Matching panels not found” error edge case.
Layout values now match panel IDs so reordered keys map to the correct constraints.
onLayoutChanged still fires when pressing elsewhere on the page or resizing another group.
Detached Separator components no longer capture the pointer.
Separator ARIA values now use proper panel indices.
Construction is guarded to avoid throwing in unsupported environments.
An edge case involving orphaned groups during pointerup was prevented.
The equality check for derived panel constraints was fixed.
Prevents context menu events from occurring while pointer-resize is active.
Improved server rendering support for the defaultSize prop.
Fixed an edge-case bug with pointer event capture.
Separators no longer scroll when receiving focus.
Checks for undefined adoptedStyleSheets to better support environments like jsdom.
Updates the in-memory layout cache when a group is resized by double-clicking on a separator.
Fixed resize actions sometimes jumping on touch devices.
Group now guards against layouts with mis-ordered Panel id keys.
Separator now sets a not-allowed cursor when its parent Group has cursors disabled.
Click events are no longer swallowed in certain cases.
A collapsible panel bugfix was re-enabled after another reported issue was fixed.
Imperative Group.setLayout now persists the layout to the in-memory cache.
The change to collapsible panel behavior from pull request 635 was disabled due to another reported regression.
Re-enables collapsible panels that were disabled in 4.5.6.
Resets separator hover state when the document receives a pointerout event.
Disabled the earlier change to collapsible panel behavior, restoring the previous behavior.
Removed the invalid aria-orientation role from the root Group element to comply with the ARIA specification.
Fixed a regression affecting collapsible Panel behavior that was introduced in 4.5.3.
Panels set max-width and max-height to 100% to fix a potential CSS overflow bug.
Safari now falls back to alternate CSS cursor styles for grab, col-resize, and row-resize cursors.
The library no longer overrides adoptedStyleSheets.
Panels within vertical groups are now sized correctly in Safari.
Fixes cursor style calculation when pointermove events provide low-precision or rounded clientX and clientY values.
Collapsible panels now treat defaultSize={0} as collapsed when mounted.
On pointerup, event.preventDefault() is no longer called unless a handle was actively dragged, fixing a Windows text selection bug.
Panel pixel size is read with offsetWidth/offsetHeight to avoid an edge-case ResizeObserver bug.
Pointerdown and pointerup handlers now use the capture phase for compatibility with UI libraries such as Blueprint JS.
Styles no longer use unset values, improving override safety for applications using the panels.
The useGroupRef type now includes | null for better compatibility with older React versions.
The usePanelRef type now includes | null for better compatibility with older React versions.
The ambiguous onResize prop type was fixed for compatibility with certain TypeScript versions.
Group handles newly registered Panels and Separators during mount, allowing user code to safely call imperative APIs earlier.
A race condition in the hook was fixed for more reliable group ref behavior.
A race condition in the hook was fixed for more reliable panel ref behavior.
Adds a guard for an unexpected defaultView value returned by some development environments.
Panel expand() now restores the size from before the panel was collapsed.
defaultLayout is ignored when its keys do not match Panel ids.
Fixes an edge case where panel constraints were not properly invalidated after resizing.
Group no longer remounts when defaultLayout or disableCursor props change.
Panel id changes are now handled gracefully.
Clicks on higher z-index elements such as modals no longer trigger separators behind them.
Invalid defaultLayout values are now handled gracefully.
Invalid layouts are no longer set when Group is hidden or has a width or height of 0.
Pointer-event styles are reset after the pointerup event, preventing stale interaction styles after pointer release.
Pointer-move delta percentages now account for Flex gap when calculating panel resizing.
Resize user experience is improved on iOS and Safari.
Separator receives focus on pointerdown, improving focus behavior during panel resizing.
Fixed the TypeScript type for the defaultLayout value returned from useDefaultLayout.
Accounts for pointer resize events near the edge of a window or iframe.
react-resizable-panels 32 changes
Breaking changes 1
The module is ESM-only, which affects how projects import and use the package with modern tooling.
Fixes and other changes 1
The pointerup and pointercancel listeners are attached to the ownerDocument body, better supporting cases such as portals rendered into a child window.