Skip to content

Search documentation

Search guides, examples, and component APIs.

Quick links
↑↓ NavigateEnter OpenEsc Close
Get started

Documentation navigation

Components / Layout

Resizable

Keyboard- and pointer-resizable horizontal or vertical panel groups.

Last changed in version 0.13.0: Add avatar groups and chips, expand the block gallery, and improve component colors, spacing, and motion.

Interactive showcase

Explorer

App.vue Vue
<script setup>
const project = ref('Aurora')
const ready = computed(() => true)
</script>

Aurora preview

Live workspace panel

Install

Run in your project
bunx --bun @getweini/cli@latest add resizable

Start with this example

Import the files copied by the install command, then place the component in your Vue template. The text and values in the example belong to your app; change them to fit your task.

Files
Editor
Vue
<script setup lang="ts">
import ResizableGroup from './components/ui/resizable/ResizableGroup.vue'
import ResizableHandle from './components/ui/resizable/ResizableHandle.vue'
import ResizablePanel from './components/ui/resizable/ResizablePanel.vue'
</script>

<template>
  <ResizableGroup
    class="h-80 w-full overflow-hidden rounded-ui border border-border"
    orientation="horizontal"
  >
    <ResizablePanel :default-size="30" :min-size="20" class="bg-muted/30 p-4">Files</ResizablePanel>
    <ResizableHandle aria-label="Resize file list" />
    <ResizablePanel :default-size="70" :min-size="35" class="p-4">Editor</ResizablePanel>
  </ResizableGroup>
</template>

Handles expose separator values and support arrows, Home, End, Enter, pointer dragging, nesting, and collapsible constraints.

When to use it

Editor split

Let readers allocate space between a file list and an editor.

Preview workspace

Resize source and preview panes while preserving minimum useful widths.

More examples

Editor split

Default percentages add up to the available group space.

Editor split
<script setup lang="ts">
import ResizableGroup from './components/ui/resizable/ResizableGroup.vue'
import ResizableHandle from './components/ui/resizable/ResizableHandle.vue'
import ResizablePanel from './components/ui/resizable/ResizablePanel.vue'
</script>

<template>
  <ResizableGroup
    class="h-80 w-full overflow-hidden rounded-ui border border-border"
    orientation="horizontal"
  >
    <ResizablePanel :default-size="30" :min-size="20" class="bg-muted/30 p-4">Files</ResizablePanel>
    <ResizableHandle aria-label="Resize file list" />
    <ResizablePanel :default-size="70" :min-size="35" class="p-4">Editor</ResizablePanel>
  </ResizableGroup>
</template>

Vertical preview

The same contract also works from top to bottom.

Vertical preview
<script setup lang="ts">
import ResizableGroup from './components/ui/resizable/ResizableGroup.vue'
import ResizableHandle from './components/ui/resizable/ResizableHandle.vue'
import ResizablePanel from './components/ui/resizable/ResizablePanel.vue'
</script>

<template>
  <ResizableGroup class="h-96" orientation="vertical" :default-value="[60, 40]">
    <ResizablePanel :min-size="25">Preview</ResizablePanel>
    <ResizableHandle aria-label="Resize preview and logs" />
    <ResizablePanel :min-size="20">Build logs</ResizablePanel>
  </ResizableGroup>
</template>

Complete API

Every public prop, model, event, slot, and exposed member of the installed Vue parts is listed below. “Not set” means you can leave that value out; “Required” means you must provide it. Native HTML attributes also work where the component uses a native element.

ResizableGroup

Complete API for ResizableGroup
NameType or signatureDefaultWhat it does
orientationpropResizableOrientation | undefined"horizontal"Arrange items horizontally or vertically.
directionpropResizableDirection | undefined"ltr"Choose the direction in which this control lays out or moves.
modelValuemodelreadonly number[] | undefinedNot setCurrent value. Use v-model to keep it in sync with your page.
defaultValuepropreadonly number[] | undefined[]Starting value when the parent does not control the value.
keyboardSteppropnumber | undefined2Amount to change for one keyboard step.
disabledpropboolean | undefinedfalsePrevent interaction and show the disabled state.
resizeevent[sizes: number[]]—Emitted when resize happens.
update:modelValueevent[sizes: number[]]—Requests a new model value from the parent.
defaultslot() => unknownRequiredContent shown inside ResizableGroup.
elementexposedHTMLElement | null—Reference to the underlying HTML element.
sizesexposednumber[]—Access sizes from a component template ref.
setSizesexposed(next: number[]) => void—Access set sizes from a component template ref.

ResizableHandle

Complete API for ResizableHandle
NameType or signatureDefaultWhat it does
disabledpropboolean | undefinedfalsePrevent interaction and show the disabled state.
defaultslot() => unknownRequiredContent shown inside ResizableHandle.

ResizablePanel

Complete API for ResizablePanel
NameType or signatureDefaultWhat it does
defaultSizepropnumber | undefinedNot setStarting size when the parent does not control it.
minSizepropnumber | undefined10Smallest allowed panel or item size.
maxSizepropnumber | undefined100Largest allowed panel or item size.
collapsiblepropboolean | undefinedfalseAllow this panel to collapse.
collapsedSizepropnumber | undefined0Size to keep visible when this panel is collapsed.
disabledpropboolean | undefinedfalsePrevent interaction and show the disabled state.
defaultslot(props: { size: number; collapsed: boolean; }) => unknownRequiredContent shown inside ResizablePanel.
Public type definitions
Public types
// packages/frameworks/vue/components/resizable/types.ts
// ------- TYPES -------

export type ResizableOrientation = 'horizontal' | 'vertical'
export type ResizableDirection = 'ltr' | 'rtl'

export interface ResizableGroupProps {
  orientation?: ResizableOrientation
  direction?: ResizableDirection
  modelValue?: readonly number[]
  defaultValue?: readonly number[]
  keyboardStep?: number
  disabled?: boolean
}

export interface ResizablePanelProps {
  defaultSize?: number
  minSize?: number
  maxSize?: number
  collapsible?: boolean
  collapsedSize?: number
  disabled?: boolean
}

export interface ResizableHandleProps {
  disabled?: boolean
}

Implementation notes

  • Choose panel minimums that keep each pane useful at the smallest supported viewport.
  • The group needs a bounded dimension along its resize axis.

Accessibility and localization

  • Handles expose separator values and support arrow keys, Home, End, and Enter.

Source contract and editing guidance