Resizable
ドラッグでサイズ変更可能なパネルコンポーネント。
インポート
react-resizable-panels のインストールが必要です。
基本的な使い方
Loading...
垂直方向
Loading...
ハンドル付き
withHandle プロップを使用すると、視覚的なハンドルを表示できます。
Loading...
3パネル構成
Loading...
Props
ResizablePanelGroup
| Prop | Type | Default | Description |
|---|---|---|---|
direction | 'horizontal' | 'vertical' | - | パネルの配置方向 |
onLayout | (sizes: number[]) => void | - | レイアウト変更時のコールバック |
ResizablePanel
| Prop | Type | Default | Description |
|---|---|---|---|
defaultSize | number | - | 初期サイズ(パーセント) |
minSize | number | - | 最小サイズ(パーセント) |
maxSize | number | - | 最大サイズ(パーセント) |
collapsible | boolean | - | 折りたたみ可能かどうか |
collapsedSize | number | - | 折りたたみ時のサイズ |
onCollapse | () => void | - | 折りたたみ時のコールバック |
onExpand | () => void | - | 展開時のコールバック |
ResizableHandle
| Prop | Type | Default | Description |
|---|---|---|---|
withHandle | boolean | false | 視覚的なハンドルを表示するかどうか |