HorizontalSplitView
Description
Divides space into top and bottom panes with an optional resizable divider
HorizontalSplitView divides a container into a top pane and a bottom pane separated by a thin splitter bar. It is well-suited for editor/preview layouts, terminal-style interfaces, or any surface where two stacked areas need to coexist.
The divider can be made interactive so users can drag it to redistribute space between the two panes at runtime.
Samples
Basic Non-Resizable Split
Resizable Split (drag the divider)
Top Pane Fixed, Bottom Grows
Bottom Pane Fixed, Top Grows
API reference
public class HorizontalSplitView : IComponent, ISpecialCaseStylingA horizontal split pane with a draggable handle that resizes a left and right pane.
- Namespace
- Tesserae
- Implements
- IComponent, ISpecialCaseStyling
Constructors
| Name | Description |
|---|---|
| HorizontalSplitView | Initializes a new instance of this class. |
Properties
| Name | Description |
|---|---|
| StylingContainer | Gets the HTMLElement that should receive styling. Exposing the root as the styling container (via ISpecialCaseStyling) lets sizing helpers like .S() / .Grow() write directly onto the split view instead of an extra wrapper when it is placed inside a Stack or Grid. |
| PropagateToStackItemParent | Gets whether styling should propagate to the stack item parent. |
public HTMLElement StylingContainerGets the HTMLElement that should receive styling. Exposing the root as the styling container (via ISpecialCaseStyling) lets sizing helpers like .S() / .Grow() write directly onto the split view instead of an extra wrapper when it is placed inside a Stack or Grid.
Methods
| Name | Description |
|---|---|
| Resizable | Configures the component to resizable. |
| Top | Aligns the content of the component to the top. |
| Bottom | Aligns the content of the component to the bottom. |
| PanelStyle | Renders the split view using the panel-style border treatment. |
| NotResizable | Disables resizing of the split view's handle. |
| SplitInMiddle | Splits the view exactly in the middle by default. |
| Close | Closes the component. |
| Open | Opens the component. |
| TopIsSmaller | Sizes the split view so the top pane is the smaller of the two, with optional min/max bounds. |
| BottomIsSmaller | Sizes the split view so the bottom pane is the smaller of the two, with optional min/max bounds. |
| Render | Renders the component's root HTML element. |
public HorizontalSplitView Resizable(Action<int> onResizeEnd = null)Configures the component to resizable.
public HorizontalSplitView Top(IComponent component, string background = "")Aligns the content of the component to the top.
public HorizontalSplitView Bottom(IComponent component, string background = "")Aligns the content of the component to the bottom.
public HorizontalSplitView PanelStyle()Renders the split view using the panel-style border treatment.
public HorizontalSplitView NotResizable()Disables resizing of the split view's handle.
public HorizontalSplitView SplitInMiddle()Splits the view exactly in the middle by default.
public HorizontalSplitView TopIsSmaller(UnitSize topSize, UnitSize maxTopSize = null, UnitSize minTopSize = null)Sizes the split view so the top pane is the smaller of the two, with optional min/max bounds.
public HorizontalSplitView BottomIsSmaller(UnitSize bottomSize, UnitSize maxBottomSize = null, UnitSize minBottomSize = null)Sizes the split view so the bottom pane is the smaller of the two, with optional min/max bounds.