Skip to content

@jsvision/ui / SplitViewOptions

Interface: SplitViewOptions ​

Defined in: ui/src/split/split-view.ts:53

Construction options for SplitView.

Properties ​

children ​

children: View[]

Defined in: ui/src/split/split-view.ts:57

The pane views, in order. N children produce N−1 splitters.


direction ​

direction: Direction

Defined in: ui/src/split/split-view.ts:55

Split axis: 'row' = side-by-side panes, 'col' = stacked panes.


grabMark? ​

optional grabMark?: boolean

Defined in: ui/src/split/split-view.ts:71

Whether each splitter draws the ▓ grab mark at its midpoint. Defaults to true. This is only the initial value — the live state lives in the public SplitView.grabMark signal, so you can flip it at runtime.


minSize? ​

optional minSize?: number | number[]

Defined in: ui/src/split/split-view.ts:65

Minimum pane size in cells — a scalar applies to every pane, an array is per-pane.


onResize? ​

optional onResize?: (sizes) => void

Defined in: ui/src/split/split-view.ts:77

Fired on every live change: each drag move that actually changes the sizes, and each keyboard step. Never fires when the sizes are unchanged — a drag held against a minimum is a silent no-op. Use this to mirror the layout live; use SplitViewOptions.onResizeEnd to persist it.

Parameters ​

sizes ​

number[]

Returns ​

void


onResizeEnd? ​

optional onResizeEnd?: (sizes) => void

Defined in: ui/src/split/split-view.ts:83

Fired once per commit: the pointer-up that ends a drag, and each discrete keyboard step. One drag gesture fires this exactly once however far the pointer travelled — so this, not SplitViewOptions.onResize, is the hook to persist a layout from.

Parameters ​

sizes ​

number[]

Returns ​

void


sizes ​

sizes: Signal<number[]>

Defined in: ui/src/split/split-view.ts:63

Two-way pane sizing as fr weights. Seed it with ratios (signal([1, 1]) = equal, [2, 1] = 2:1); a drag rewrites it with the resolved cell counts. Restoring saved weights into a differently-sized container rescales them proportionally.