Tesserae

SplitView

Description

The SplitView component creates a two-pane container that arranges two child components separated by a draggable splitter. This component is ideal for displaying resizable panels side-by-side (or top/bottom when using horizontal variations) within your UI. It is part of the Tesserae Components group, which provides various UI controls for building interactive interfaces.

Usage

Instantiate a SplitView using the helper method from Tesserae.UI. You can add content to the left and right panels using the Left() and Right() methods. By default, the splitter is non-resizable; calling Resizable() enables drag-to-resize functionality.

Below is a basic usage example:

Public Properties

There are no explicitly exposed public properties for the SplitView component. Configuration and state management are handled via its fluent interface methods.

API reference

class

SplitView

public class SplitView : IComponent

A vertical split view component.

Constructors

Constructor
SplitView
public SplitView(UnitSize splitterSize = null)

Initializes a new instance of the class.

Parameters

splitterSize
The size of the splitter.

Methods

Method
SplitView.Resizable
public SplitView Resizable(Action<int> onResizeEnd = null, string backgroundColor = null)

Sets the split view to be resizable.

Parameters

onResizeEnd
An optional action to perform when resizing ends.

Returns

The current instance.

Method
SplitView.Left
public SplitView Left(IComponent component, string background = "")

Sets the left component.

Parameters

component
The component.
background
The background color.

Returns

The current instance.

Method
SplitView.Right
public SplitView Right(IComponent component, string background = "")

Sets the right component.

Parameters

component
The component.
background
The background color.

Returns

The current instance.

Method
SplitView.PanelStyle
public SplitView PanelStyle()

Sets the panel style for the split view.

Returns

The current instance.

Method
SplitView.NotResizable
public SplitView NotResizable()

Sets the split view to be not resizable.

Returns

The current instance.

Method
SplitView.SplitInMiddle
public SplitView SplitInMiddle()

Splits the view in the middle.

Returns

The current instance.

Method
SplitView.Close
public SplitView Close()

Closes the split view.

Returns

The current instance.

Method
SplitView.Open
public SplitView Open()

Opens the split view.

Returns

The current instance.

Method
SplitView.LeftIsSmaller
public SplitView LeftIsSmaller(UnitSize leftSize, UnitSize maxLeftSize = null, UnitSize minLeftSize = null)

Sets the left component to be smaller.

Parameters

leftSize
The left size.
maxLeftSize
The maximum left size.
minLeftSize
The minimum left size.

Returns

The current instance.

Method
SplitView.RightIsSmaller
public SplitView RightIsSmaller(UnitSize rightSize, UnitSize maxRightSize = null, UnitSize minRightSize = null)

Sets the right component to be smaller.

Parameters

rightSize
The right size.
maxRightSize
The maximum right size.
minRightSize
The minimum right size.

Returns

The current instance.

Method
SplitView.Render
public HTMLElement Render()

Renders the component.

Returns

The rendered HTML element.

Samples

Basic SplitView with Resizable Panels

This sample demonstrates how to create a SplitView, assign components to the left and right panels, and enable panel resizing on the fly.

Configuring Side-Specific Panel Sizes

This sample shows how to configure the SplitView so that one of the panels is set to a fixed smaller width.

See also

© 2026 Tesserae. All rights reserved.