Skip to content
RefineUI

Resizable

Split panel layout with drag handles.

Sidebar
Main

Overview

Machine-readable contract from Component Spec.

component: resizableexport: Resizableversion: 1attributes: data-refineui=resizable-panel-group

Anatomy

Partdata-refineui
rootresizable-panel-group
resizable_handleresizable-handle
resizable_panelresizable-panel

Variants

AxisValues
orientationhorizontal, vertical

Accessibility

SlotElementRole
resizable-handledivseparator

Keyboard

KeyActionNative
Homefirst-trigger
Endlast-trigger

Layout

PropertyValue
directionlogical
rtltrue
npm install @refineui/react @refineui/tokens
import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from "@refineui/react";
<ResizablePanelGroup orientation="horizontal">
<ResizablePanel defaultSize={50} minSize={30}>
Left panel
</ResizablePanel>
<ResizableHandle />
<ResizablePanel defaultSize={50} minSize={30}>
Right panel
</ResizablePanel>
</ResizablePanelGroup>
<ResizablePanelGroup orientation="vertical" onLayout={(sizes) => console.log(sizes)}>
<ResizablePanel size={topPanelSize} onResize={setTopPanelSize}>
Top
</ResizablePanel>
<ResizableHandle withHandle />
<ResizablePanel>
Bottom
</ResizablePanel>
</ResizablePanelGroup>
PropDefaultTypeDescription
orientation"horizontal""horizontal" | "vertical"Split direction.
onLayout(sizes: number[]) => voidFires after resize with panel sizes (percentages summing to ~100).
PropDefaultTypeDescription
defaultSize50numberInitial size as percentage.
minSize10numberMinimum size percentage.
maxSize100numberMaximum size percentage.
sizenumberControlled size percentage.
onResize(size: number) => voidEvent handler when panel resizes.
PropDefaultTypeDescription
withHandlefalsebooleanShows grip affordance on separator.
disabledfalsebooleanDisables resizing.