Basic Usage
Props
Widget identifier. Required for interaction.
Layout direction:
"horizontal"- Panels arranged left to right"vertical"- Panels arranged top to bottom
Reconciliation key.
Accessibility label for screen readers.
Resizable Panel Props
Child panels created withui.resizablePanel() support:
Initial size (percentage or cells, depending on parent).
Minimum panel size in cells.
Maximum panel size in cells.
Whether panel can collapse to minimum size.
Examples
Two-Panel Layout
Three-Panel Layout
Vertical Split
Collapsible Sidebar
Nested Panel Groups
IDE-Style Layout
Dashboard with Collapsible Panels
Panel Group vs Split Pane
| Feature | Panel Group | Split Pane |
|---|---|---|
| State management | Automatic | Manual (controlled) |
| Child API | ui.resizablePanel() | Direct children |
| Nesting | Easy | Requires state |
| Flexibility | Declarative | Full control |
- You want automatic state management
- Building declarative layouts
- Nesting multiple resizable sections
- You need precise control over sizes
- Persisting layout state
- Custom resize logic
Size Constraints
Panels respect constraints during resize:Performance
- Layout is computed once per resize
- Divider dragging is smooth and responsive
- Nested panel groups perform well (tested up to 4 levels)
See Also
- Split Pane - Manual resizable panels
- Grid - 2D grid layout
- Row - Horizontal stack
- Column - Vertical stack