Skip to content
Back

Resizable panelsPro

Trade space between panes by dragging or with the keyboard: rubber-band limits, squeezed content fades, collapsible panes leave a restore tab.

oxyn add resizable-panels
Files
src/
main.rs
auth.rs
tests/
Cargo.toml
auth.rs
fn verify(token: &str) -> Result<Claims> {
let key = keys::current()?;
decode(token, &key)
}
Agent
Reading auth.rs
Found 2 call sites
Proposing a fix…
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • Trade space between files, editor and agent panes; the same model drives the app shell’s resizable sidebar that snaps to icons.

When not to use

Installation

Resizable panels is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add resizable-panels

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Ide

Files, editor and agent panes.

Files
src/
main.rs
auth.rs
tests/
Cargo.toml
auth.rs
fn verify(token: &str) -> Result<Claims> {
let key = keys::current()?;
decode(token, &key)
}
Agent
Reading auth.rs
Found 2 call sites
Proposing a fix…
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Two

Two panes with a grip handle.

Files
src/
main.rs
auth.rs
tests/
Cargo.toml
auth.rs
fn verify(token: &str) -> Result<Claims> {
let key = keys::current()?;
decode(token, &key)
}
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Vertical

Stacked editor and terminal (Oxyn plus).

Files
src/
main.rs
auth.rs
tests/
Cargo.toml
auth.rs
fn verify(token: &str) -> Result<Claims> {
let key = keys::current()?;
decode(token, &key)
}
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Readout

Shares shown in each pane header.

Files24%
src/
main.rs
auth.rs
tests/
Cargo.toml
auth.rs52%
fn verify(token: &str) -> Result<Claims> {
let key = keys::current()?;
decode(token, &key)
}
Agent24%
Reading auth.rs
Found 2 call sites
Proposing a fix…
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

ResizablePanels

PropTypeDefaultDescription
panesrequiredVec<PaneView>—Panes.
labelString"Panels"Group label.
heightf32320.0Height px.
verticalboolDefault::default()Stack vertically.
handleString"line"`line` · `grip`.
readoutboolDefault::default()Show each pane's share.
on_layout_changeEventHandler<Vec<f32>>—Layout settled (percent shares).

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
← →Move the divider 16 px (Shift: 64 px)
HomeorEndTo a limit
EnterCollapse or restore the neighbour
EscapeCancel a drag
Double-clickReset the layout

Accessibility

  • Dividers are focusable separators with aria-valuenow, min, max and valuetext.
  • Collapsed panes are inert; the group is labelled.
From the spec

Each divider is a focusable separator with aria-orientation, aria-controls, aria-valuenow/min/max in percent and aria-valuetext (“Files 25 %”, or “Files hidden, press Enter to show”). Collapsed panes are inert.

Motion & interaction

Dividers follow the pointer 1:1 (pointer capture) and clamp; a pane pushed well past its minimum snaps shut and leaves a small restore tab that pops in. Content fades as a pane is squeezed below its minimum.

Timing
TransitionDurationEasingReduced motion
Line hover120 mslinearinstant
Restore tab260 mspopfade
Squeeze fade120 mslinearinstant

Responsive behaviour

  • Needs a definite height; panes do not stack on mobile (switch to tabs).
  • Pointer capture with touch-action none for touch, pen and mouse.
Edge cases (spec)

Needs a definite height. Container resizes scale the panes. Keyboard limits never collapse (Home / End clamp). Panes do not stack on mobile; switch to tabs.

Notes for AI

  • Import ResizablePanels, PaneView from oxyn_dioxus and include PRIMITIVES_CSS plus the token stylesheet once.
  • A GPUI version exists: ResizableEl in oxyn_gpui.
  • Props to set first: panes.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI