Back to Components

Shell

Resizable

Two-pane container with a draggable handle. Pointer-based — works with mouse, touch, pen. No headless dep.

Examples

Drag the divider

Left (40%)
Right (60%)
<Resizable bind:primarySize>
  {#snippet primary()}<div>Left</div>{/snippet}
  {#snippet secondary()}<div>Right</div>{/snippet}
</Resizable>

Props

PropTypeDefaultDescription
direction'horizontal' | 'vertical''horizontal'Split direction.
primarySizenumber50Primary pane size in percent (bindable).
minPrimarynumber10Min primary size (percent).
maxPrimarynumber90Max primary size (percent).
primarySnippetLeft / top pane content.
secondarySnippetRight / bottom pane content.

Install

CLI

npx @a3tai/mittsu add resizable