Gathering detailed insights and metrics for @alisowski/react-resizable-panels
Gathering detailed insights and metrics for @alisowski/react-resizable-panels
Gathering detailed insights and metrics for @alisowski/react-resizable-panels
Gathering detailed insights and metrics for @alisowski/react-resizable-panels
npm install @alisowski/react-resizable-panels
Typescript
Module System
Node Version
NPM Version
81.4
Supply Chain
92.5
Quality
76.7
Maintenance
100
Vulnerability
100
License
TypeScript (96.35%)
CSS (3.38%)
JavaScript (0.18%)
HTML (0.09%)
Total Downloads
49,923
Last Day
41
Last Week
1,188
Last Month
6,255
Last Year
40,578
MIT License
4,586 Stars
535 Commits
184 Forks
7 Watchers
6 Branches
45 Contributors
Updated on Jul 04, 2025
Minified
Minified + Gzipped
Latest Version
0.1.27
Package Id
@alisowski/react-resizable-panels@0.1.27
Unpacked Size
836.02 kB
Size
174.11 kB
File Count
57
NPM Version
8.19.4
Node Version
16.20.2
Published on
Aug 06, 2024
Cumulative downloads
Total Downloads
React components for resizable panel groups/layouts
1import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels"; 2 3<PanelGroup autoSaveId="example" direction="horizontal"> 4 <Panel defaultSize={25}> 5 <SourcesExplorer /> 6 </Panel> 7 <PanelResizeHandle /> 8 <Panel> 9 <SourceViewer /> 10 </Panel> 11 <PanelResizeHandle /> 12 <Panel defaultSize={25}> 13 <Console /> 14 </Panel> 15</PanelGroup>
PanelGroup
prop | type | description |
---|---|---|
autoSaveId | ?string | Unique id used to auto-save group arrangement via localStorage |
children | ReactNode | Arbitrary React element(s) |
className | ?string | Class name to attach to root element |
direction | "horizontal" | "vertical" | Group orientation |
disablePointerEventsDuringResize | ?boolean = false | Disable pointer events inside Panel s during resize 2 |
id | ?string | Group id; falls back to useId when not provided |
onLayout | ?(sizes: number[]) => void | Called when group layout changes |
storage | ?PanelGroupStorage | Custom storage API; defaults to localStorage 1 |
style | ?CSSProperties | CSS style to attach to root element |
tagName | ?string = "div" | HTML element tag name for root element |
1: Storage API must define the following synchronous methods:
getItem: (name:string) => string
setItem: (name: string, value: string) => void
2: This behavior is disabled by default because it can interfere with scrollbar styles, but it can be useful in the edge case where a Panel
contains an <iframe>
PanelGroup
components also expose an imperative API for manual resizing:
method | description |
---|---|
setLayout(panelSizes: number[]) | Resize panel group to the specified panelSizes ([1 - 100, ...] ). |
Panel
prop | type | description |
---|---|---|
children | ReactNode | Arbitrary React element(s) |
className | ?string | Class name to attach to root element |
collapsedSize | ?number=0 | Panel should collapse to this size |
collapsible | ?boolean=false | Panel should collapse when resized beyond its minSize |
defaultSize | ?number | Initial size of panel (numeric value between 1-100) |
id | ?string | Panel id (unique within group); falls back to useId when not provided |
maxSize | ?number = 100 | Maximum allowable size of panel (numeric value between 1-100); defaults to 100 |
minSize | ?number = 10 | Minimum allowable size of panel (numeric value between 1-100); defaults to 10 |
onCollapse | ?(collapsed: boolean) => void | Called when panel is collapsed; collapsed boolean parameter reflecting the new state |
onResize | ?(size: number) => void | Called when panel is resized; size parameter is a numeric value between 1-100. 1 |
order | ?number | Order of panel within group; required for groups with conditionally rendered panels |
style | ?CSSProperties | CSS style to attach to root element |
tagName | ?string = "div" | HTML element tag name for root element |
1: If any Panel
has an onResize
callback, the order
prop should be provided for all Panel
s.
Panel
components also expose an imperative API for manual resizing:
method | description |
---|---|
collapse() | If panel is collapsible , collapse it fully. |
expand() | If panel is currently collapsed, expand it to its most recent size. |
getCollapsed(): boolean | Returns true if the panel is currently collapsed (size === 0 ). |
getSize(): number | Returns the most recently commited size of the panel as a percentage (1 - 100 ). |
resize(percentage: number) | Resize panel to the specified percentage (1 - 100 ). |
PanelResizeHandle
prop | type | description |
---|---|---|
children | ?ReactNode | Custom drag UI; can be any arbitrary React element(s) |
className | ?string | Class name to attach to root element |
disabled | ?boolean | Disable drag handle |
id | ?string | Resize handle id (unique within group); falls back to useId when not provided |
onDragging | ?(isDragging: boolean) => void | Called when group layout changes |
style | ?CSSProperties | CSS style to attach to root element |
tagName | ?string = "div" | HTML element tag name for root element |
No vulnerabilities found.
No security vulnerabilities found.
Last Day
-12.8%
41
Compared to previous day
Last Week
-28.6%
1,188
Compared to previous week
Last Month
-11%
6,255
Compared to previous month
Last Year
334.2%
40,578
Compared to previous year