// Generated by scripts/generate-showcase.mjs. Do not edit directly. page LayoutSplitterDetail { layout = "showcase" state playground_color = ctx.url.searchParams.get("pg_color") ?? "primary" state playground_size = Number(ctx.url.searchParams.get("pg_size") ?? "50") state playground_orientation = ctx.url.searchParams.get("pg_orientation") ?? "horizontal" state playground_minSize = Number(ctx.url.searchParams.get("pg_minSize") ?? "15") state playground_step = Number(ctx.url.searchParams.get("pg_step") ?? "5") state playground_label = ctx.url.searchParams.get("pg_label") ?? "Layout Splitter" state playground_class = ctx.url.searchParams.get("pg_class") ?? "showcase-instance showcase-instance--1" seo { title = "Layout Splitter" description = "Theme-aware, responsive layout splitter component." } view {
Layout component

Layout Splitter

Theme-aware, responsive layout splitter component.

7 props3 slots1 outputsTheme readyResponsive
Interactive playground

Configure Layout Splitter

Change any prop and inspect the server-rendered component immediately.

Live preview
Component code
<LayoutSplitter
  label="Layout Splitter">
  <div data-slot="start">
    <div class="showcase-slot">start slot</div>
  </div>
  <div data-slot="end">
    <div class="showcase-slot">end slot</div>
  </div>
</LayoutSplitter>
Event outputInteract with the preview to inspect the typed payload.
Component props7 controls
Live examples

Designed for real product surfaces

Compare configurations and resize the browser to check responsive behavior.

Recommended

Drag or arrow the divider

Two panes with a movable divider. Drag it, or focus it and use the arrow keys; Home and End go to the bounds. The size is resolved in the runtime and written onto the container as a custom property, because a pointermove fires far too often to route through a client function.

01
Live preview
Component usage.wrn
<LayoutSplitter
  size="40"
  minSize="20">
  <div data-slot="start">
    <div class="showcase-slot">start slot</div>
  </div>
  <div data-slot="end">
    <div class="showcase-slot">end slot</div>
  </div>
</LayoutSplitter>
Advanced

Stacked panes

Vertical orientation splits top from bottom and switches the arrow keys to up and down. Below the small breakpoint both orientations stack, because two panes side by side stop making sense on a phone.

02
Live preview
Component usage.wrn
<LayoutSplitter
  size="60"
  orientation="vertical"
  minSize="25"
  step="10"
  label="Resize rows">
  <div data-slot="start">
    <div class="showcase-slot">start slot</div>
  </div>
  <div data-slot="end">
    <div class="showcase-slot">end slot</div>
  </div>
</LayoutSplitter>
Component outputs

Receive every typed component output

Use declarative output handlers in .wrn files or register a direct output handler from JavaScript. The canonical API exposes payload and does not require event.detail.

@sizeChangeFires when the component emits the sizeChange event.
Declarative handlers.wrn
<LayoutSplitter
  @sizeChange='console.log(payload)'
/>
Direct output handlers.js
import { registerOutputHandler } from "@wrnexus/csr/outputs"

const component = document.querySelector("[data-ui-component=\"LayoutSplitter\"], [data-component=\"LayoutSplitter\"]")

if (component) registerOutputHandler(component, "sizeChange", (payload) => {
  console.log("sizeChange", payload)
})
Component API

Props and configuration

All content and behavior shown above is supplied through these props and slots.

PropTypeDefaultRequired
colorstring"primary"No
sizenumber50No
orientationstring"horizontal"No
minSizenumber15No
stepnumber5No
labelstring"Resize panels"No
classstring""No
} }