Layout

Splitter

@xui/splitter

Resizable split panes — drag the gutter between two panels to resize them. Panels take percentage sizes with optional min/max; nest splitters for grids.

Install

pnpm add @xui/splitter

Add the barrel to a standalone component's imports:

import { XuiSplitterImports } from '@xui/splitter';

@Component({
  imports: [XuiSplitterImports],
  // …
})

Examples

Horizontal

Loading preview…

Three panes

Loading preview…

Vertical

Loading preview…

API

XuiSplitterPanel

componentxui-splitter-panel

One resizable pane inside {@link XuiSplitter}. defaultSize is its initial percentage (0 = auto-distribute the remaining space); min/max bound resizing.

Inputs

NameTypeDefaultdefaultSizenumberInitial size as a percentage; 0 means "share the leftover space equally".0minnumberSmallest size this panel may be dragged to, as a percentage of the splitter.0maxnumberLargest size this panel may be dragged to, as a percentage of the splitter.100

XuiSplitter

componentxui-splitter

Resizable split panes. Wrap <xui-splitter-panel> children; drag the gutter between two panels to resize them. orientation runs the panels horizontally (default) or vertically. Sizes are percentages; sizeChange emits them.

Inputs

NameTypeDefaultclassClassValueExtra classes, merged into the component's own rather than replacing them.''orientation'horizontal' | 'vertical'Which way the panels are laid out: side by side (horizontal) or stacked (vertical). The handles run across that axis.'horizontal'

Outputs

NameTypesizeChangenumber[]Emits every panel's size as a percentage, in order, whenever a handle is dragged.

Source

libs/ui/splitter/xui

xUI 2.0.0 — Apache 2.0 licensed. Built with Angular and Tailwind CSS.