120k

Resizable

Accessible resizable panel groups and layouts with keyboard support.

About

The Resizable component is built on top of react-resizable-panels by bvaughn.

Installation

pnpm dlx shadcn@latest add @force-ui-vue/resizable

Usage

<script setup lang="ts">
import {
  ResizableHandle,
  ResizablePanel,
  ResizablePanelGroup,
} from "@/components/ui/resizable"
</script>
 
<template>
  <ResizablePanelGroup direction="horizontal">
    <ResizablePanel>One</ResizablePanel>
    <ResizableHandle />
    <ResizablePanel>Two</ResizablePanel>
  </ResizablePanelGroup>
</template>

Composition

Use the following composition to build a ResizablePanelGroup:

ResizablePanelGroup
├── ResizablePanel
├── ResizableHandle
└── ResizablePanel

Examples

Vertical

Use direction="vertical" for vertical resizing.

Handle

Use the withHandle prop on ResizableHandle to show a visible handle.

RTL

To enable RTL support in Force UI, see the RTL configuration guide.

API Reference

See the react-resizable-panels documentation.