Support a mix of percentage and pixel based units at the Panel
level:
<Panel defaultSizePixels={100} minSizePercentage={20} maxSizePercentage={50} />
Note: Pixel units require the use of a
ResizeObserver
to validate. Percentage based units are recommended when possible.
Example migrating panels with percentage units
v55 | v56 |
---|---|
<Panel
defaultSize={25}
minSize={10}
maxSize={50}
/>
|
<Panel
defaultSizePercentage={25}
minSizePercentage={10}
maxSizePercentage={50}
/>
|
Example migrating panels with pixel units
v55 | v56 |
---|---|
<PanelGroup
direction="horizontal"
units="pixels"
>
<Panel minSize={100} maxSize={200} />
<PanelResizeHandle />
<Panel />
</PanelGroup>
|
<PanelGroup direction="horizontal">
<Panel
minSizePixels={100}
maxSizePixels={200}
/>
<PanelResizeHandle />
<Panel />
</PanelGroup>
|
For a complete list of supported properties and example usage, refer to the docs.