Documentation
¶
Overview ¶
Package term renders a ui Node tree as terminal text: headings, paragraphs word-wrapped at a width, lists, tables, quotes, code, links, and inline bold/italic/underline as ANSI styles when Color is on.
It walks the tree (ui.Walk), so it sees elements and text. A component that only renders HTML — a templ component, a NodeFunc — and Safe content arrive as HTML, which is parsed into the same tree, so their headings, tables and lists lay out as if written in JSX.
The package is pure: whether to use color (NO_COLOR, a tty) is the caller's decision. The page's text never carries terminal commands: its control characters, but newlines and tabs, are dropped (ANSI escapes, OSC sequences, carriage returns, C1 controls), so text a visitor wrote can't restyle, retitle or clear the terminal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.