Bus UI Terminal

TerminalOutputView renders node-first output chunks.

Use it for stdout, stderr, stdin, or system fragments that need deterministic ordering and an explicit empty state.

Public API

TerminalOutputView(chunks []TerminalChunk, emptyText string, log ControlLogSink) gx.Node

When to use it

Use TerminalOutputView whenever the host has chunked terminal data and wants the renderer to validate sequence order and stream labels.

Key props

TerminalChunk, NormalizeTerminalChunks, and emptyText.

Example

Loading TerminalOutputView demo...

Go API

import (
  gx "github.com/busdk/bus-gx/pkg/gx"
  terminalui "github.com/busdk/bus-ui/pkg/terminalui"
)

node := terminalui.TerminalOutputView([]terminalui.TerminalChunk{
  {Stream: "stdout", Text: "ok"},
}, "No output yet.", nil)

html, err := gx.RenderHTML(node)

.gx source

In .gx source, author the visible component state as GX markup. Keep the Go API block above for the package helper or render-boundary call.

package busuiexamples

import gx "github.com/busdk/bus-gx/pkg/gx"

func TerminalOutputViewExample() gx.Node {
  return <pre class="terminal-output" aria-label="Terminal output">
  <Text value={"No output yet."}></Text>
</pre>
}

Related

Return to Terminal or the Bus UI reference.