I hit a wall the first time a client asked for a mail-style layout where users could drag the divider between the inbox list and the message view. Fixed widths broke on wide monitors, and hand-rolling drag logic ate two days of my sprint. Resizable panels solved it in an afternoon.
If you build dashboards, IDEs, or split-view apps in React and Next.js, you need panels that users can drag and resize without breaking your layout. That is exactly what these components do.
I put this list together after building and testing each layout in real Next.js projects. Every component here is free, installs through a single CLI command, and drops into your codebase with a copy-paste approach. No paywalls, no lock-in.
What is Shadcn Resizable?
Shadcn Resizable is a layout system for splitting a screen into panels users can drag and adjust. It is built on three parts: ResizablePanelGroup, ResizablePanel, and ResizableHandle. Together, they turn a static container into an adjustable workspace.
ResizablePanelGroup is the wrapper that sets direction (horizontal or vertical) and holds your panels. Each ResizablePanel is a section a user can grow or shrink, and you control its limits with minSize, maxSize, and defaultSize. The ResizableHandle is the draggable divider between panels, and you can add a visible grip so users know where to grab.
You point the group in a direction, drop your panels inside, and place a handle between them. That is the whole model. It works the same whether you are splitting an inbox from a preview pane or stacking an editor over a console.
How Shadcn Resizable Helps Developers
Resizable panels give control back to the user, which cuts your layout support tickets. Fixed proportions never fit every screen, and a 1440px monitor needs different spacing than a 13-inch laptop. Draggable panels let each user size their own workspace, so you ship one layout that works everywhere.
Here is what you get in practice:
- Ship faster: Skip custom drag math and pointer event handling.
- Persist layouts: Add an
autoSaveId and panel sizes survive a page reload through local storage or cookies.
- Stay accessible: Handles respond to arrow keys, Home, End, and Enter out of the box.
- Compose freely: Drop scroll areas, cards, tables, or forms inside any panel.
The components expose onResize, onCollapse, and onExpand callbacks, and you can drive panels through React refs for full programmatic control. Which is what you need when a toolbar button should collapse a sidebar.
Installation
Every Shadcn component installs with one CLI command, and you can pick your package manager. Here is the pnpm version:
pnpm dlx shadcn@latest add @shadcn-space/resizable-01
npm, yarn, and bun follow the same pattern with their own runner. Swap the prefix, and the rest stays identical:
npx shadcn@latest add @shadcn-space/resizable-01
yarn dlx shadcn@latest add @shadcn-space/resizable-01
bunx shadcn@latest add @shadcn-space/resizable-01
The command pulls the component code straight into your project. This is a copy-paste approach, so you own the files and edit them like any other component. No hidden dependency to update, no version to babysit.
Best Shadcn Resizable Components and Examples
I picked these because each solves a distinct layout problem you will meet in real apps. All are built with React, Next.js, Tailwind CSS, Framer Motion, Radix UI, and Base UI. Here is what each one does and where it fits.

The Master-Detail Split Pane puts a searchable list on one side and a full detail view on the other, both resizable from a shared handle. Drag left to browse more rows, drag right to read the selected record in depth. I use this pattern for order tables where you need to scan 12 rows and inspect one without leaving the page. It pairs a scrollable data list with an inspector panel that shows customer, product, payment, and status fields.
- Order management tables with a live detail inspector
- Email and inbox clients showing message lists beside content
- Contact directories with a profile preview pane
- Support ticket queues with a full-thread reader
- CRM records where you scan and edit side by side
Best for: SaaS order and inbox interfaces.

The Horizontal Split divides the screen left to right into a sidebar and a main content area. You drag the handle to widen navigation or reclaim space for content, and you can collapse the sidebar to a slim rail. This is the layout I reach for in admin panels and documentation apps. Set a minSize on the sidebar so it never shrinks below a readable width, and users get a clean two-column workspace they can tune.
- Admin dashboards with a collapsible left navigation
- Documentation sites with a table of contents beside pages
- Settings screens with a category list and detail form
- File explorers pairing a folder tree with a content view
- Analytics apps with filters on the left and charts on the right
Best for: Sidebar and content layouts.

The Vertical Split stacks two panels top to bottom with a horizontal drag handle between them. Pull the divider up or down to resize the header region against the content below. I use this for editors where a preview or console sits under the main working area. It keeps both regions in view at once, so you edit on top and watch output update underneath without switching tabs.
- Code editors with a live preview or console below
- Form builders showing fields above and JSON output below
- Data tools pairing a query area with a results grid
- Content editors with a draft on top and a preview beneath
- Log viewers with controls above and streaming output below
Best for: Stacked header and content editors.

The Nested Panels layout places panel groups inside other panels, mixing horizontal and vertical splits in one screen. You get a sidebar, a header, and a content region that all resize independently. This is the structure behind IDE and workspace apps that need three or more adjustable zones. Nest a ResizablePanelGroup inside a ResizablePanel, and you can build any grid your interface demands.
- IDE layouts with a file tree, editor, and terminal
- Design tools with a canvas, layers panel, and properties pane
- Dashboards mixing navigation, charts, and detail cards
- Trading and monitoring screens with multiple live feeds
- Multi-pane workspaces where each zone resizes on its own
Best for: Multi-pane IDE or dashboard workspaces.
Developer Checklist
Run through this before you ship a resizable layout. It covers the mistakes I made so you can skip them.
- Set
minSize and maxSize on every panel so none collapse to an unreadable width.
- Give the parent container a fixed height (
h-full or a set value like h-[600px]), or panels will not render.
- Add
autoSaveId on the group to persist sizes across reloads.
- Test keyboard control: focus the handle and use arrow keys, Home, End, and Enter.
- Add a visible grip on the handle so touch and mouse users can find it.
- Switch the group
direction or swap layouts with a media query for small screens.
- Wire
onResize, onCollapse, and onExpand if other UI reacts to panel state.
- Wrap long panel content in a scroll area so it never pushes the layout.
- Confirm drag stays smooth with real data loaded, not just placeholders.
FAQs
1. How do I make Shadcn resizable panels responsive on mobile in Next.js?
Switch the panel direction based on viewport width, or hide the split entirely on small screens. Watch the width with a media query, and render a horizontal layout on desktop and a stacked or single-panel view on mobile. The panels support touch gestures, so drag still works on tablets. For phones, a full-screen detail view usually beats a cramped split.
2. How do I save and restore resizable panel sizes between page reloads?
Pass a unique autoSaveId prop to your ResizablePanelGroup. The panels then write their sizes to local storage or cookies automatically and restore them on the next load. Give each distinct layout its own ID so their saved states never collide. This keeps each user's custom workspace exactly as they left it.
3. Can I nest resizable panels to build an IDE-style layout in React?
Yes, you nest a ResizablePanelGroup inside a ResizablePanel. Set the outer group to horizontal for a sidebar and main area, then place a vertical group inside the main panel to stack an editor over a terminal. Each group resizes on its own. That is how you build a three-zone IDE layout with independent drag controls.
Conclusion
Resizable panels turn a rigid screen into a workspace your users control, and these cover the layouts you build most: master-detail, horizontal, vertical, and nested. Each one is free and drops in with a single command.
Every component ships in both Radix UI and Base UI versions, so you match whichever primitive your project already runs on. You install through the CLI with pnpm, npm, yarn, or bun, and the code copies straight into your repo. You own the files and edit them like your own.
Pick the layout that fits your app, run the install command, and set minSize plus a container height. From there, you have a draggable, accessible, and persistent workspace ready to ship. Start with the Master-Detail Split Pane if you are building an order or inbox view, and grow into Nested Panels when your interface needs more zones.