useLivePreviewPanelMinSize
useLivePreviewPanelMinSize():
object
Defined in: packages/react/src/livePreview/useLivePreviewPanelState.ts:46
The narrowest share each split column may be dragged to, plus the ref that measures the split.
Asymmetric on purpose: the preview’s floor is the larger one, because a narrow form still reflows into something usable while a squeezed preview stops representing the page. On a laptop that is 55% preview / 35% form; a larger display derives smaller shares for both.
Measures the split container, NOT the viewport. The sidebar, its collapsed
state, and the shell’s gutters all change how much width the two columns
actually divide, so a viewport-derived floor is wrong by ~256px whenever
the sidebar is open — which is what made the limits drift when it was
toggled. A ResizeObserver also catches the sidebar animating open, which
fires no window event at all.
Starts at the absolute floor, never at a large value: two floors summing past 100 leave no range and the handle will not move.
Returns
Section titled “Returns”object
ref — a callback ref for the element wrapping the split — and the
minimum percentage for each column.
minSizes
Section titled “minSizes”minSizes:
LivePreviewPanelMinSizes
ref: (
element) =>void
Parameters
Section titled “Parameters”element
Section titled “element”HTMLDivElement | null
Returns
Section titled “Returns”void