Faber UI
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

Terminal
pnpm dlx shadcn@latest add https://faber-ui.vercel.app/r/resizable.json

Usage

typescript
"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.

PartBuilt onProps
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
  • withHandle?boolean

Changelog

  1. 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
  2. v0.2.0Resizable pins react-resizable-panels to 4.14.1.minor
Full Resizable history

Last updated on

On this page