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.

Component gallery demo: browsing the built-in components in the Termina demo gallery

The component gallery — demos/Termina.Demo.Gallery.

Display Components ​

ComponentDescription
TextNodeRenders styled text with word wrapping
PanelNodeBordered container with title
SpinnerNodeAnimated loading indicator
GraphNodeLive scrolling graph with gradient coloring
ProgressBarNodeProgress bar with gradient fill and label
StreamingTextNodeStreaming text with scrolling

Input Components ​

ComponentDescription
TextInputNodeSingle-line text input with cursor
TextAreaNodeMulti-line text input with word wrap and vertical scrolling
CopyableTextNodeRead-only text with keyboard selection and clipboard support
SelectionListNodeInteractive list selection with keyboard navigation
FilePickerNodeFile/folder picker with directory navigation and filtering

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
DynamicLayoutNodeRe-evaluates factory on invalidation
KeyedDynamicLayoutNodeKey-based content with retained or transition-evicted children

Composite Components ​

ComponentDescription
WizardNodeMulti-step wizard with progress, navigation, and focus

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.