ResizablePanels
Two panels with pointer and keyboard resizing.
Interactive preview
README.md
theme.css
App.tsx
Focus the divider and use the arrow keys.
Usage
import { ResizablePanels } from "@devvy-ui/react";
<ResizablePanels label="Resize editor">{[<p key="a">Files</p>,<p key="b">Editor</p>]}</ResizablePanels>API reference
Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:
| Prop | Type | Default | Description |
|---|---|---|---|
| children | readonly [ReactNode, ReactNode] | required | The two panel contents. |
| value / defaultValue | number | 50 | First-panel percentage. |
| min / max | number | 10 / 90 | Allowed split. |
| orientation | horizontal / vertical | horizontal | Panel direction. |
Accessibility & behavior
Platform Behavior & Guidelines
The separator exposes its current percentage. Arrow keys resize, Shift increases the step, Home/End use bounds. Pointer capture supplies drag/touch resizing.
Source ownership
Run npx @devvy-ui/cli init once in your React project, then add the source:
npx @devvy-ui/cli add resizable-panelsMake the source yours.
Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.
Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.