Skip to content
Browse library
BIU UI/Components/Resizable
COMPONENTS

Resizable

Explore the Resizable component and try its interactive examples.

INTERACTIVE PREVIEW

Preview

Loading preview…
GET STARTED

Installation

Install the component source via shadcn Registry, the BIU CLI, or as an npm package.

TERMINAL / pnpm
pnpm dlx shadcn add @biudev/resizable

First time using @biudev? Map "@biudev": "https://ui.biu.dev/r/0.1.0/{name}.json" under registries in your components.json (see setup).

Usage

Start with this example, then adjust the import path for your project.

EXAMPLE / TSX
"use client";
import { ResizableHandle, ResizablePanel, ResizablePanelGroup } from "@/components/ui/biu/resizable";

export function Example() {
  return (
    <div
      style={{ height: 200, borderRadius: 12, overflow: "hidden", border: "1px solid rgba(128,128,128,.2)" }}
    >
      <ResizablePanelGroup direction="horizontal">
        <ResizablePanel defaultSize={35} minSize={20}>
          <div style={{ padding: 16, fontSize: 13 }}>Sidebar</div>
        </ResizablePanel>
        <ResizableHandle withHandle aria-label="Resize sidebar" />
        <ResizablePanel defaultSize={65} minSize={30}>
          <div style={{ padding: 16, fontSize: 13 }}>Main content</div>
        </ResizablePanel>
      </ResizablePanelGroup>
    </div>
  );
}

Examples

Try each example or switch to its code.

API reference

Properties and defaults from the component source. An asterisk marks a required property; a dash means no explicit default.

ResizableDirection

Also accepts properties from 'horizontal' & 'vertical'.

Some properties depend on the variant; consult the source for the full union.

ResizablePanelHandle

ResizablePanelGroupProps

Also accepts properties from Omit<ComponentPropsWithRef<'div'>, 'children'>.

ResizablePanelProps

Also accepts properties from ComponentPropsWithRef<'div'>.

ResizableHandleProps

Also accepts properties from ComponentPropsWithRef<'div'>.

Source

Review a formatted version of the component source used by the Registry.