Resizable

Accessible resizable panel groups and layouts with keyboard support.

Loading preview…

Installation

Usage

Use resizable for split layouts. Built on PaneForge. Compose PaneGroup + Pane + Handle. Set direction to horizontal or vertical. Pass withHandle on Handle for a visible grip.

1<script lang="ts">
2	import * as Resizable from '~/components/resizable';
3</script>
4
5<Resizable.PaneGroup direction="horizontal" class="max-w-md rounded-lg border">
6	<Resizable.Pane defaultSize={50}>
7		<div class="flex h-[200px] items-center justify-center p-6">
8			<span class="font-semibold">One</span>
9		</div>
10	</Resizable.Pane>
11	<Resizable.Handle withHandle />
12	<Resizable.Pane defaultSize={50}>
13		<div class="flex h-[200px] items-center justify-center p-6">
14			<span class="font-semibold">Two</span>
15		</div>
16	</Resizable.Pane>
17</Resizable.PaneGroup>