Resizable
Uses react-resizable-panels for size calculation and separator accessibility. Neumorphism styles only the panel boundary and handle instead of reimplementing panel state.
@neumorphism-ui/resizablePreview
List
Details
Installation
Installation: resizable
npx shadcn@latest add @neumorphism-ui/resizableThe CLI resolves npm dependencies, base tokens, utilities, and component source in order.
New to this Registry? Set up the namespace before continuing.
Usage
Import
Resizable import code
"use client";
import {
ResizableHandle,
ResizablePanel,
ResizablePanelGroup,
} from "@/components/ui/resizable";Example
Resizable usage code
export default function Example() {
return <ResizablePanelGroup orientation="horizontal" className="h-48 max-w-lg">
<ResizablePanel defaultSize={40} minSize={25}><div className="grid h-full place-items-center p-4">List</div></ResizablePanel>
<ResizableHandle withHandle />
<ResizablePanel defaultSize={60} minSize={30}><div className="grid h-full place-items-center p-4">Details</div></ResizablePanel>
</ResizablePanelGroup>;
}API Reference
| Component | Prop | Type | Default | Description |
|---|---|---|---|---|
ResizablePanelGroup | orientationrequired | "horizontal" | "vertical" | — | Sets the panel split direction. |
ResizablePanel | defaultSize | number | string | — | Sets the initial panel size. |
ResizablePanel | minSize / maxSize | number | string | — | Constrains how far a panel may shrink or grow. |
ResizableHandle | withHandle | boolean | false | Shows a visual grip in the middle of the separator. |
ResizableHandle | disabled | boolean | false | Keeps the separator visible while disabling resizing. |
Accessibility
- 01
ResizableHandle relies on the library separator semantics and current size values; do not add a fake slider.
- 02
Keyboard users can focus the separator and change panel size with arrow keys.
- 03
The visual grip is aria-hidden while the separator itself owns the interaction meaning.