Structure

Resizable

Split panes you can drag or arrow-key, with a hand-drawn grip to hold onto.

Seed drawer

Potting bench

Garden notes

Show code
import {
  ResizableHandle,
  ResizablePanel,
  ResizablePanelGroup,
} from "@/registry/lilt/ui/resizable";

export default function ResizableDemo() {
  return (
    <div className="h-64 w-full max-w-2xl overflow-hidden rounded-[var(--radius-card)] border border-[var(--lilt-border)]">
      <ResizablePanelGroup orientation="horizontal">
        <ResizablePanel
          className="flex items-center justify-center"
          defaultSize="30"
          minSize="20"
        >
          <p className="text-sm text-[var(--lilt-text-muted)]">Seed drawer</p>
        </ResizablePanel>
        <ResizableHandle withHandle />
        <ResizablePanel minSize="30">
          <ResizablePanelGroup orientation="vertical">
            <ResizablePanel className="flex items-center justify-center">
              <p className="text-sm text-[var(--lilt-text-muted)]">
                Potting bench
              </p>
            </ResizablePanel>
            <ResizableHandle />
            <ResizablePanel className="flex items-center justify-center">
              <p className="text-sm text-[var(--lilt-text-muted)]">
                Garden notes
              </p>
            </ResizablePanel>
          </ResizablePanelGroup>
        </ResizablePanel>
      </ResizablePanelGroup>
    </div>
  );
}

Installation

npx shadcn@latest add @lilt/resizable

Accessibility

  • Each handle is a real role='separator' with aria-valuenow — arrow keys resize, Home/End snap, and it shows the lilt focus ring.
  • The visible line is 1px but the pointer hit target is widened by the library, keeping drags forgiving.