Skip to content

Component Library

Termina provides a set of built-in layout nodes (components) for building terminal UIs. Each component handles a specific rendering concern and can be composed together.

Display Components

ComponentDescription
TextNodeRenders styled text with word wrapping
PanelNodeBordered container with title
SpinnerNodeAnimated loading indicator
StreamingTextNodeStreaming text with scrolling

Input Components

ComponentDescription
TextInputNodeSingle-line text input with cursor
SelectionListNodeInteractive list selection with keyboard navigation

Container Components

ComponentDescription
ScrollableContainerVertical scrolling container
StackLayoutOverlapping children (z-stack)
ModalNodeModal overlay with backdrop

Reactive Components

ComponentDescription
ReactiveLayoutNodeUpdates content from observables
ConditionalNodeShow/hide based on condition

Utility Components

ComponentDescription
EmptyNodePlaceholder that renders nothing
DeferredNodeDelegates to node without owning it

Common Patterns

All components inherit from LayoutNode and share common methods:

csharp
// Size constraints
node.Height(3);                      // Fixed height
node.Width(40);                      // Fixed width
node.Fill();                         // Fill remaining height
node.WidthFill();                    // Fill remaining width
node.HeightAuto();                   // Auto-size to content
node.Width(SizeConstraint.Percent(50)); // Percentage

// Get constraint object for custom use
node.HeightConstraint = SizeConstraint.Fill(weight: 2);

Creating Custom Components

See the Custom Components guide for building your own layout nodes.

Released under the Apache 2.0 License.