Resizable
키보드 접근성을 지원하는 크기 조절 패널 그룹과 레이아웃입니다.
1번 영역
2번 영역
3번 영역
개요
The Resizable component is built on top of react-resizable-panels by bvaughn.
설치
사용법
import {
ResizableHandle,
ResizablePanel,
ResizablePanelGroup,
} from "@/components/ui/resizable"<ResizablePanelGroup orientation="horizontal">
<ResizablePanel>One</ResizablePanel>
<ResizableHandle />
<ResizablePanel>Two</ResizablePanel>
</ResizablePanelGroup>구성
다음 조합으로 ResizablePanelGroup:
ResizablePanelGroup
├── ResizablePanel
├── ResizableHandle
└── ResizablePanel예제
Vertical
Use orientation="vertical" for vertical resizing.
헤더 영역
본문 영역
Handle
Use the withHandle prop on ResizableHandle to show a visible handle.
측면 메뉴
본문 영역
RTL
RTL 지원을 활성화하려면 RTL 설정 가이드를 참고하세요.
واحد
اثنان
ثلاثة
API 참조
react-resizable-panels 문서를 참고하세요.
변경 내역
2025-02-02 react-resizable-panels v4
Updated to react-resizable-panels v4. v4.0.0 release notes for full details.
If you're using react-resizable-panels primitives directly, note the following changes:
| v3 | v4 |
|---|---|
PanelGroup | Group |
PanelResizeHandle | Separator |
direction prop | orientation prop |
defaultSize={50} | defaultSize="50%" |
onLayout | onLayoutChange |
ImperativePanelHandle | PanelImperativeHandle |
ref prop on Panel | panelRef prop |
data-panel-group-direction | aria-orientation |
The krdscn/ui wrapper components (ResizablePanelGroup, ResizablePanel,
ResizableHandle) remain unchanged.