Resizable

Resizes two adjacent panes with a draggable 1px handle. Arrow keys adjust the split.

Left pane
Right pane

Split

Type

Field

Use it for

  • Two panes the user sizes against each other: editor and preview, list and detail.
  • Percentages for initial, min, and max.

Not for

  • More than two panes; nest a Split.
  • Layouts that should stack on phones by other rules; it stacks at 640px on its own.

Three ways in. They share one source, so the pixels match whichever you pick.

1. Import the package

npm install @noorddev/vlak-react

// once, next to your app's root
import "@noorddev/vlak-react/css";

import { Split } from "@noorddev/vlak-react";

Precompiled React and one stylesheet. No compiler to configure. Per-component imports work too: @noorddev/vlak-react/components/resizable.

2. Vendor the source

npx @noorddev/vlak-cli add resizable

The StyleX leaf lands in components/vlak/, for your own compiler to own. See StyleX.

3. Through shadcn

npx shadcn add https://vlak.dev/r/resizable.json

The same registry item, installed by shadcn's CLI.

CSS only

<link rel="stylesheet" href="node_modules/@noorddev/vlak/css/vlak.css" />

No React. Link vlak.css and use the markup and classes below.

import { Split } from "@noorddev/vlak-react";

<Split initial={60} min={30} max={80} handleLabel="Resize editor and preview">
  <Editor />
  <Preview />
</Split>

Split

Two panes on a draggable hairline. Arrows step, Home/End jump; the axis follows the layout.

PropTypeDefaultDescription
initialnumber50Starting share of the first pane, in percent.
minnumber20
maxnumber80
handleLabelstring"Resize panes"Accessible name of the handle.
childrenrequired[ReactNode, ReactNode]

Also accepts HTMLAttributes<HTMLDivElement>.

KeysDoes
TabFocuses the handle
Arrow left, Arrow upShrinks the first pane by 2%
Arrow right, Arrow downGrows it by 2%
Shift + Arrow keysMoves by 10%
Home, EndJumps to min or max
<div class="rs-split"><div class="rs-split-pane" style="width:50%">Left</div><button class="rs-split-handle" role="separator" aria-valuenow="50"></button><div class="rs-split-pane" style="width:50%">Right</div></div>
.rs-split.rs-split-pane.rs-split-handle