Mark Yo

Resizable Panels

Component

About

A split-pane layout component for horizontal or vertical panels with draggable handles, per-panel min/max sizes, collapsible panels, double-click reset, and keyboard-resizable separators.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Resizable Panels to your project and fits it to your theme.

Code

How Resizable Panels is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import ResizablePanelsDefault, {
  ResizablePanel,
} from "@/components/ui/resizable-panels";

export default function ResizablePanelsDemo() {
  return (
    <div className="h-[400px] w-full rounded-lg border">
      <ResizablePanelsDefault direction="horizontal">
        <ResizablePanel
          defaultSize={25}
          minSize={15}
          className="flex items-center justify-center p-4"
        >
          <span className="text-sm text-muted-foreground">Sidebar</span>
        </ResizablePanel>
        <ResizablePanel
          defaultSize={75}
          minSize={30}
          className="flex items-center justify-center p-4"
        >
          <span className="text-sm text-muted-foreground">Content</span>
        </ResizablePanel>
      </ResizablePanelsDefault>
    </div>
  );
}

Dependencies

More by Mark Yo

View all
  • Loader

    Loader

    66
  • Pricing Table

    Pricing Table

    24
  • Bento Grid

    Bento Grid

    8
  • Wallet Card

    Wallet Card

    4
  • Expandable Tabs

    Expandable Tabs

    4
  • Image Gallery

    Image Gallery

    3
  • CTA Section

    CTA Section

    3
  • Bar Chart

    Bar Chart

    1