v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

ResizablePanels

Two panels with pointer and keyboard resizing.

Interactive preview

Files

README.md
theme.css
App.tsx

Editor

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:

PropTypeDefaultDescription
childrenreadonly [ReactNode, ReactNode]requiredThe two panel contents.
value / defaultValuenumber50First-panel percentage.
min / maxnumber10 / 90Allowed split.
orientationhorizontal / verticalhorizontalPanel 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-panels

Make 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.

ResizablePanels.tsxREACT / TSX

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.