Skip to content

Resizable ​

Accessible resizable panel groups and layouts with keyboard support.

Examples ​

Default ​

One
Two
Three
vue
<script setup>
import {
  ResizableHandle,
  ResizablePanel,
  ResizablePanelGroup,
} from '@empathyds/vue'
</script>

<ResizablePanelGroup
  direction="horizontal"
  class="max-w-md rounded-lg border"
>
  <ResizablePanel :default-size="50">
    <div class="flex h-50 items-center justify-center p-6">
      <span class="font-semibold">One</span>
    </div>
  </ResizablePanel>
  <ResizableHandle />
  <ResizablePanel :default-size="50">
    <ResizablePanelGroup direction="vertical">
      <ResizablePanel :default-size="25">
        <div class="flex h-full items-center justify-center p-6">
          <span class="font-semibold">Two</span>
        </div>
      </ResizablePanel>
      <ResizableHandle />
      <ResizablePanel :default-size="75">
        <div class="flex h-full items-center justify-center p-6">
          <span class="font-semibold">Three</span>
        </div>
      </ResizablePanel>
    </ResizablePanelGroup>
  </ResizablePanel>
</ResizablePanelGroup>

Props ​

ResizablePanelGroup ​

PropTypeDefaultDescription
directionhorizontal | vertical-The direction of the panel group.
unitspixel | percentpercentThe units for the panel size.
idstring-The id of the panel group.

ResizablePanel ​

PropTypeDefaultDescription
defaultSizenumber-The default size of the panel.
minSizenumber0The minimum size of the panel.
maxSizenumber100The maximum size of the panel.
idstring-The id of the panel.
ordernumber-The order of the panel.
tagNamestringdivThe tag name of the panel.
collapsiblebooleanfalseWhether the panel is collapsible.
collapsedSizenumber0The size of the panel when collapsed.
collapseThresholdnumber0The threshold for collapsing the panel.

Slots ​

ResizablePanelGroup ​

SlotDescription
defaultThe panels and handles of the group.

ResizablePanel ​

SlotDescription
defaultThe content of the panel.