Skip to content

Layout

ResizeHandle

Draggable handle for resizing adjacent panels.

import { ResizeHandle } from '@var-ui/react';
Sidebar (200px)
Main

ResizeHandle

Accessible drag/keyboard separator for single-region resize. Bind value / minValue / maxValue / onValueChange (often via useResizable().handleProps).

Examples

Default

Horizontal resize between a sidebar and main (default orientation="horizontal").

Sidebar (200px)
Main
Demo.tsxTSX
import { ResizeHandle } from '@var-ui/react';

<ResizeHandle value={width} minValue={120} maxValue={280} onValueChange={setWidth} aria-label="Resize sidebar" />

Vertical

Set orientation="vertical" to resize stacked panels along the block axis.

Top (100px)
Bottom
Demo.tsxTSX
import { ResizeHandle } from '@var-ui/react';

<div style={{ display: 'flex', flexDirection: 'column', height: '12.5rem' }}>
  <div style={{ height }}>Top</div>
  <ResizeHandle
    orientation="vertical"
    value={height}
    minValue={60}
    maxValue={160}
    onValueChange={setHeight}
    aria-label="Resize panels"
  />
  <div style={{ flex: 1 }}>Bottom</div>
</div>

Props

Accessibility

Renders as role="separator" with aria-orientation, aria-valuenow / min / max, and a required aria-label. Arrow keys nudge by 10px (50px with Shift); Home/End jump to bounds; Enter/double-click fire onCollapse when provided.