Skip to content
Logic2BUI

Search docs

Search components and documentation

New
Menu

Resizable

Resizable split panels the user can drag to resize, horizontal or vertical.

One
Two
Three

Installation

npx logic2b@next add resizable

Usage

import {
  ResizableHandle,
  ResizablePanel,
  ResizablePanelGroup,
} from "@/components/ui/resizable"

<ResizablePanelGroup direction="horizontal" className="h-64">
  <ResizablePanel defaultSize="40%">One</ResizablePanel>
  <ResizableHandle withHandle />
  <ResizablePanel defaultSize="60%">Two</ResizablePanel>
</ResizablePanelGroup>

Usage notes

Built on react-resizable-panels v4. This registry wraps its Group/Panel/Separator exports as ResizablePanelGroup/ResizablePanel/ResizableHandle and keeps the familiar direction prop name (mapped internally to the library’s orientation prop) for API stability across upstream versions.

Panels hide implicit overflow by default so a nested library wrapper does not become an unnamed keyboard-inaccessible scroll region. When panel content must scroll, add your own overflow-auto container inside the panel and give that container an accessible name and tabIndex={0}.

Examples

Vertical

Header
Content

Constrained sizes

Main

Live playground

Edit the component props and inspect the exact JSX before copying it. The preview loads only when this section enters the viewport.

Generated JSX
<ResizablePanelGroup
  direction="horizontal"
>
  <ResizablePanel
    defaultSize={40}
  >
    <div
      className="flex h-full items-center justify-center bg-muted/40 text-sm"
    >Navigation</div>
  </ResizablePanel>
  <ResizableHandle
    withHandle
   />
  <ResizablePanel
    defaultSize={60}
  >
    <div
      className="flex h-full items-center justify-center text-sm"
    >Content</div>
  </ResizablePanel>
</ResizablePanelGroup>

API reference

Generated from the public TypeScript exports in src/ui/resizable.tsx.

View JSON

ResizablePanelGroup

Component
Props: React.ComponentProps<typeof ResizablePanelGroupPrimitive> & { direction?: "horizontal" | "vertical" }
PropTypeRequiredDefaultDescription
direction"horizontal" | "vertical"No"horizontal"—

ResizablePanel

Component
Props: React.ComponentProps<typeof ResizablePanelPrimitive>

ResizableHandle

Component
Props: React.ComponentProps<typeof ResizableSeparatorPrimitive> & { withHandle?: boolean }
PropTypeRequiredDefaultDescription
withHandlebooleanNo——

Accessibility contract

Machine-readable behavior and consumer responsibilities for resizable.

View JSON
Support
Primitive-managed
Pattern
separator
React Resizable Panels
Keyboard interactions for resizable
KeysBehavior
ArrowUp ArrowDown ArrowLeft ArrowRightMove within the composite control.
Home EndMove the separator to its supported extent.

Built-in semantics

  • Handles expose separator semantics, orientation and value information.

Consumer responsibilities

  • Give handles an accessible label when adjacent panel context is ambiguous.