Join our Discord Community

Shadcn Resizable

React resizable for adjustable panel layouts and splitview interfaces with drag handles. Built with TypeScript and Tailwind CSS for Next.js.

Resizable panels buggy?

Join our Discord community for help from other developers.


Ever built an admin dashboard where half the screen was wasted space? Or used an app where the sidebar covered everything important and you couldn't resize it? Yeah, that's exactly why fixed layouts frustrate users. This shadcn/ui resizable component brings VS Code-style adjustable panels to your React applications.

Resizable showcase

Drag the handles to create your perfect layout:

Loading component...

Built on react-resizable-panels with keyboard navigation, smooth animations, and all the constraint handling you need for professional interfaces. Styled with Tailwind CSS to match your design system instead of looking like a generic system splitter from Windows 95.

npx shadcn@latest add resizable

Why resizable panels actually solve layout problems

Here's the thing—everyone works differently, and fixed layouts never fit anyone perfectly. Think about how VS Code lets you resize the file explorer, or how Figma's panels adapt to your workflow. Users want control over their workspace, not layouts designed for some mythical "average" person.

Resizable panels eliminate the one-size-fits-none problem by letting users create layouts that actually work for their tasks and screen sizes. No more squinting at cramped content or scrolling endlessly because someone decided 300px was the perfect sidebar width. Plus they're accessible with keyboard navigation and remember user preferences across sessions.

This free shadcn resizable component handles the complex parts—drag mechanics, collision detection, persistence, keyboard control—while you focus on creating interfaces that adapt to users. Whether you're building admin dashboards, code editors, or data visualization tools in your Next.js applications, panels that resize intuitively keep users productive in your JavaScript projects.

Common resizable patterns you'll actually use

Code editor layout

Classic IDE-style with file tree and main content:

Loading component...

Dashboard with collapsible sidebar

Admin panels that adapt to workflow needs:

Loading component...

Three-column layout

Email client style with navigation, list, and detail:

Loading component...

Data visualization workspace

Charts and controls that users can arrange:

Loading component...

Split view editor

Side-by-side content comparison and editing:

Loading component...

Features

This free open source resizable component includes everything you need:

  • TypeScript-first - Full type safety with panel events and constraint management
  • React-resizable-panels powered - Battle-tested drag mechanics and performance
  • Keyboard accessible - Tab navigation and arrow key resizing with fine control
  • Tailwind CSS styled - Customize with utilities, not fighting component CSS
  • Smooth animations - No janky movements or flickering during resize
  • Constraint system - Min/max sizes that respect each other and content
  • Persistence support - Save and restore user layouts across sessions
  • Touch optimized - Works naturally on tablets and touch devices

API Reference

Core Components

ComponentPurposeKey Props
ResizablePanelGroupContainer for panelsdirection, autoSaveId for persistence
ResizablePanelIndividual paneldefaultSize, minSize, maxSize, collapsible
ResizableHandleDrag dividerwithHandle for visible grip, disabled

Panel Configuration

SettingTypePurpose
defaultSizenumberInitial panel size as percentage
minSize / maxSizenumberSize constraints to prevent unusable layouts
collapsiblebooleanAllow panel to collapse completely
autoSaveIdstringPersist layout to localStorage with this key

Layout Options

ConfigurationUse CaseImplementation
50/50 splitEqual content areasdefaultSize={50} on both panels
Sidebar layoutNavigation + contentdefaultSize={20} and 80
Collapsible panelHide when not neededcollapsible={true} with collapse controls

Production tips

Start with layouts that work for most users. This free shadcn/ui resizable component lets users customize, but provide sensible defaults that don't require immediate adjustment. This TypeScript component handles the mechanics—you provide starting layouts that make sense for common workflows in your Next.js applications.

Set meaningful constraints on panel sizes. Don't let panels collapse to unusable dimensions or expand beyond their content needs. This open source shadcn component respects your min/max settings—use them to prevent layouts that break your interface or hide important content.

Make resize handles discoverable and accessible. Users need visual cues that panels can be resized, especially on first use. This JavaScript component supports visible handles and hover states—combine with good visual design to guide user discovery of resizable functionality.

Consider mobile and touch interactions carefully. Resizable panels work on touch devices, but small screens often need different layout strategies. The Tailwind CSS styled component handles touch events—consider disabling resize on mobile or providing layout presets instead.

Persist user layouts when it matters. For productivity apps where users spend significant time, save their preferred layouts. This component includes localStorage persistence—use it for applications where users develop workflow preferences and layout habits.

Integration with other components

Resizable panels naturally work with Sheet components for mobile-friendly alternatives and Tabs components for switching between panel content in your React applications. Use Button components for layout presets and collapse controls.

For complex interfaces, combine resizable panels with Card components to organize panel content or ScrollArea components for long content lists. This open source pattern creates professional dashboard and editor experiences.

When building admin tools, pair resizable panels with DataTable components for data-heavy interfaces or Dialog components for configuration without losing layout context. Separator components help organize complex panel content visually.

For development tools, use resizable panels with Command components for searchable file trees or Breadcrumb components for navigation context. Your JavaScript application can compose these shadcn components while maintaining intuitive layout control.

Questions you might have