Components
Resizable
Resizable panels with drag handles.
Resizable is built on react-resizable-panels. It renders panels that the user can resize by dragging handles between them.
Installation
pnpm dlx shadcn@latest add https://faber-ui.vercel.app/r/resizable.jsonUsage
"use client";
import {
ResizableHandle,
ResizablePanel,
ResizablePanelGroup,
} from "@/components/ui/resizable";
export default function Example() {
return (
<ResizablePanelGroup direction="horizontal">
<ResizablePanel defaultSize={50}>Left</ResizablePanel>
<ResizableHandle />
<ResizablePanel defaultSize={50}>Right</ResizablePanel>
</ResizablePanelGroup>
);
}Examples
Default
Left
Right
With handle
Left
Right
API
Each part forwards every prop of what it is built on, including className and render where Base UI supports it. The props column lists only what Faber UI adds on top.
| Part | Built on | Props |
|---|---|---|
ResizablePanelGroupdata-slot="resizable-panel-group" | ResizablePrimitive.Groupreact-resizable-panels | — |
ResizablePaneldata-slot="resizable-panel" | ResizablePrimitive.Panelreact-resizable-panels | — |
ResizableHandledata-slot="resizable-handle" | ResizablePrimitive.Separatorreact-resizable-panels |
|
Changelog
- v0.3.0KbdGroup is typed as a kbd element, Combobox imports its Base UI subpath, the motion lib mirrors the exit easing and travel tokens, and the chart item declares its react-is peer.patch
- v0.2.0Resizable pins react-resizable-panels to 4.14.1.minor
Last updated on