콘텐츠로 이동
RefineUI

Resizable

드래그 핸들이 있는 분할 패널 레이아웃.

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"분할 방향.
onLayout(sizes: number[]) => void리사이즈 후 패널 크기(합이 약 100%인 백분율)로 호출됩니다.
PropDefaultTypeDescription
defaultSize50number초기 크기(백분율).
minSize10number최소 크기 백분율.
maxSize100number최대 크기 백분율.
sizenumber제어형 크기 백분율.
onResize(size: number) => void패널 리사이즈 시 이벤트 핸들러.
PropDefaultTypeDescription
withHandlefalseboolean구분선에 grip affordance를 표시합니다.
disabledfalseboolean리사이즈를 비활성화합니다.