PyBlade/ui
Menu⌄
DocsComponentsResizable

Resizable

Panels you resize by dragging the handle between them, or with the arrow keys.

Alpine.js3 files

Installation

pyblade-ui add resizable

Usage

The tags <pb-ui.resizable-group> <pb-ui.resizable-panel> <pb-ui.resizable-handle> are available in all your templates.

<pb-ui.resizable-group direction="horizontal" class="min-h-48 rounded-lg border">
  <pb-ui.resizable-panel :size="50"><div class="p-6">One</div></pb-ui.resizable-panel>
  <pb-ui.resizable-handle with_handle />
  <pb-ui.resizable-panel :size="50"><div class="p-6">Two</div></pb-ui.resizable-panel>
</pb-ui.resizable-group>

Props

<pb-ui.resizable-group>
PropDefault
direction'horizontal'
<pb-ui.resizable-panel>
PropDefault
size50
min10
<pb-ui.resizable-handle>
PropDefault
with_handleFalse

Any other attribute (class, id, x-on:click, hx-post…) is passed to the root element; your Tailwind classes win over the component's.