Resizable

Utility

Resizable panel system with drag handles, min/max constraints, and layout persistence

Resizable

Flexible resizable panel layouts for editors, dashboards, email clients and documentation sites. Supports horizontal and vertical splits, nested groups, variants and custom handles.

Basic horizontal split

Use ResizablePanelGroup with direction="horizontal" to create classic split layouts. Each ResizablePanel receives a defaultSize percentage.

Two-column layout

Left panel
Right panel

Vertical split & nesting

Switch direction to "vertical" for stacked layouts. You can nest panel groups to build more complex structures.

Top / bottom panels

Top panel
Bottom panel

Code editor layout

Recreate code editor experiences with a sidebar, main editor and bottom terminal using nested resizable groups.

VS Code–style layout

EXPLORER
components.tsx
App.tsx
utils.ts
components.tsx
import { ResizablePanelGroup, ResizablePanel, ResizableHandle } from "saha-ui";

export function EditorLayout() {
  return (
    <ResizablePanelGroup direction="horizontal">
      <ResizablePanel defaultSize={25}>
        <div>Sidebar</div>
      </ResizablePanel>
      <ResizableHandle withHandle />
      <ResizablePanel defaultSize={75}>
        <div>Editor</div>
      </ResizablePanel>
    </ResizablePanelGroup>
  );
}
TERMINAL

$ npm run dev

✓ Development server running

http://localhost:5173

_

Email client layout

Create three-pane layouts with a resizable sidebar, list and content panel—ideal for mail clients or split views.

Gmail-style layout

Inbox12
Starred
Trash
GitHub10:30 AM

New pull request

Team Meeting9:15 AM

Sprint planning

NewsletterYesterday

Weekly digest

New pull request

GitHub10:30 AM

A new pull request has been opened for your repository. Please review the changes and provide feedback.

Feature: Add resizable panels component

Analytics dashboard

Use larger panel groups to structure navigation, key metrics and chart areas in a responsive admin-style layout.

Sidebar + metrics + chart

Overview
Analytics
Reports
Settings

Key metrics

Total users

12,543

+12.5%

Revenue

$45,231

+8.2%

Conversion

3.24%

+2.1%

Traffic overview

Chart visualization area

Documentation layout

Build doc sites with a resizable table of contents and main content area—great for long-form guides.

Docs two-pane layout

Table of contents

GETTING STARTED
Introduction
Installation
Quick start
COMPONENTS
Resizable
Button
Modal

Quick start guide

Get started with the resizable component in a few minutes.

Installation

npm install saha-ui

Usage

Import the components you need and compose your layout using ResizablePanelGroup, ResizablePanel and ResizableHandle.

All variants showcase

Apply visual variants to the wrapper, panels and handles to express hierarchy and state (primary, secondary, glass, outline, etc.).

Variant combinations

Default
Left
Right
Primary
Left
Right
Secondary
Left
Right
Accent
Left
Right
Success
Left
Right
Warning
Left
Right
Error
Left
Right
Info
Left
Right
Outline
Left
Right
Glass
Left
Right

Usage Guidelines

When to Use

  • Split layouts
  • Adjustable panels
  • IDE-style interfaces

Accessibility

  • Keyboard resizing support
  • Size announced on change

Performance

  • RAF drag handling
  • Efficient layout updates

Common Mistakes

  • Resize handles too small
  • No min/max constraints

Frequently Asked Questions

Resizable creates panels with drag handles that users can resize with min/max constraints.
Yes, Resizable can persist layout to localStorage.

View on GitHub

See the full source code on GitHub