Installation
npx logic2b@next add resizableUsage
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
Constrained sizes
Live playground
Edit the component props and inspect the exact JSX before copying it. The preview loads only when this section enters the viewport.
<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.
ResizablePanelGroup
ComponentProps: React.ComponentProps<typeof ResizablePanelGroupPrimitive> & { direction?: "horizontal" | "vertical" }| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
direction | "horizontal" | "vertical" | No | "horizontal" | — |
ResizablePanel
ComponentProps: React.ComponentProps<typeof ResizablePanelPrimitive>ResizableHandle
ComponentProps: React.ComponentProps<typeof ResizableSeparatorPrimitive> & { withHandle?: boolean }| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
withHandle | boolean | No | — | — |
Accessibility contract
Machine-readable behavior and consumer responsibilities for resizable.
- Support
- Primitive-managed
- Pattern
- separator
- React Resizable Panels
| Keys | Behavior |
|---|---|
| ArrowUp ArrowDown ArrowLeft ArrowRight | Move within the composite control. |
| Home End | Move 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.