Effects JS behaviour

Resizable panels

Split panes — horizontal, vertical, nested — with draggable handles, keyboard (arrows, Home/End, Enter), min/max sizes, collapse on double-click and remembered sizes. Right-to-left aware.

Real scenarios

The component as it is used in a product — not a specimen grid.

Code editor layout

Drag the handles, or tab to one and use the arrows (Shift for big steps), Home and End. Double-click or press Enter to fold the sidebar or the terminal. Sizes survive a reload.

<x-nx::card>
    <h1>{{ $invoice->number }}</h1>
    <x-nx::invoice :invoice="$invoice" />
</x-nx::card>
$ php artisan test --filter=Invoice
  PASS  Tests\Feature\InvoiceTest
  ✓ it renders an invoice      0.21s
  Tests:  1 passed

Mail client, inbox over reading pane

A vertical group: the list cannot shrink below 25%, the message never below 35%.

  • Sara Novak Contract for the spring campaign
  • Billing Your invoice for September
  • Alex Keller Re: launch checklist

Contract for the spring campaign

Hi! The signed contract is attached. Could you confirm the delivery dates for the three videos by Thursday?

Important props

Important props
Prop Type Default What it does
orientation string 'horizontal' horizontal (side by side) or vertical (stacked); nest a group in a pane for a grid.
storage-key string null Remembers the sizes in localStorage under this key.
pane: size · min · max number (%) null Starting size and limits in percent; panes without a size share the rest.
pane: collapsible bool false Folds when dragged under half its minimum, on double-click or Enter on its handle.
handle: label string 'Resize' Accessible name of the role=separator handle.

Snippet

<x-nx::resizable-panels storage-key="editor" style="block-size: 30rem" x-on:nx-resize="$wire.set('layout', $event.detail.sizes)">
    <x-nx::resizable-pane :size="22" :min="15" :max="40" collapsible>…فایل‌ها…</x-nx::resizable-pane>
    <x-nx::resizable-handle label="تغییر اندازهٔ نوار کناری" />
    <x-nx::resizable-pane>
        <x-nx::resizable-panels orientation="vertical">
            <x-nx::resizable-pane :size="70">…ویرایشگر…</x-nx::resizable-pane>
            <x-nx::resizable-handle label="تغییر اندازهٔ ترمینال" />
            <x-nx::resizable-pane :min="10" collapsible>…ترمینال…</x-nx::resizable-pane>
        </x-nx::resizable-panels>
    </x-nx::resizable-pane>
</x-nx::resizable-panels>