Skip to content

Resizable

A component that allows users to resize a container by dragging, supporting 2D resizing, aspect ratio locking, and panel splitting.

Basic Usage

Supports resizing in horizontal or vertical directions, or simultaneously in multiple directions.

Basic Resizable
300px x 200px
Example

Aspect Ratio Locking

You can lock the aspect ratio during resizing by setting the lock-aspect-ratio prop.

demo
16:9 (300 x 169)
Example

Panel Splitting

Combine BrResizableSplit and BrResizableSplitPane to create a multi-panel split layout.

Sidebar
Keyboard navigation supported
Main Content
Terminal / Console
Example

Integration with Table

The Resizable component can be easily integrated with the Table component to create adaptive data grids.

Resizable Table Card
ID
Name
Role
1John DoeDeveloper
2Jane SmithDesigner
3Mike JohnsonManager
Example

Integration with Card

Place a Card inside a resizable container and utilize internal scroll areas for more content.

Resizable Card

Drag the handle to resize this card component.

This is a card component nested inside a resizable container. Notice how the card header stays fixed while the content area scrolls if it overflows.

You can integrate the Resizable component with almost any other UI element to create dynamic layouts.

Example

API

Resizable Props

NameDescriptionTypeDefault
asThe HTML element to renderstring'div'
width / v-model:widthContainer widthnumber | string-
height / v-model:heightContainer heightnumber | string-
minWidthMinimum widthnumber0
maxWidthMaximum widthnumberInfinity
minHeightMinimum heightnumber0
maxHeightMaximum heightnumberInfinity
directionsAllowed resize directions('top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right')[]['right', 'bottom', 'bottom-right']
lockAspectRatioLock aspect ratio. Can be a boolean (locks initial ratio) or a specific numeric ratioboolean | numberfalse
gridSnapping grid size. Can be a single number or a [x, y] arraynumber | [number, number]1
stepKeyboard resize stepnumber10
disabledWhether resizing is disabledbooleanfalse

Resizable Emits

NameDescriptionCallback Parameters
update:widthFired when width changes(width: number) => void
update:heightFired when height changes(height: number) => void
resizeStartFired when resizing starts(event: { width: number; height: number; direction: string }) => void
resizeFired during resizing(event: { width: number; height: number; direction: string }) => void
resizeEndFired when resizing ends(event: { width: number; height: number; direction: string }) => void

ResizableHandle Props

NameDescriptionTypeDefault
directionThe direction the handle controls (used in non-Split mode)string-
splitWhether it acts as a handle for Split modebooleanfalse
withHandleWhether to show the built-in icon in Split modebooleanfalse

ResizableSplit Props

Based on SplitterGroup from radix-vue. Passes through all its props.

NameDescriptionTypeDefault
directionSplit direction'horizontal' | 'vertical'-

ResizableSplitPane Props

Based on SplitterPanel from radix-vue. Passes through all its props.

NameDescriptionTypeDefault
defaultSizeDefault size percentagenumber-
minSizeMinimum size percentagenumber0
maxSizeMaximum size percentagenumber100