Versions in this module Expand all Collapse all v1 v1.0.0 Feb 20, 2026 Changes in this version + var DoubleBorder = BorderChars + var NormalBorder = BorderChars + var RoundedBorder = BorderChars + var ThickBorder = BorderChars + type ANSIRenderer struct + ColorMode ColorMode + func NewANSIRenderer() *ANSIRenderer + func NewANSIRendererWithMode(mode ColorMode) *ANSIRenderer + func (r *ANSIRenderer) ClearScreen() string + func (r *ANSIRenderer) EnterAltScreen() string + func (r *ANSIRenderer) ExitAltScreen() string + func (r *ANSIRenderer) HideCursor() string + func (r *ANSIRenderer) MoveCursor(x, y int) string + func (r *ANSIRenderer) RenderStyle(s *Style) string + func (r *ANSIRenderer) Reset() string + func (r *ANSIRenderer) ShowCursor() string + type BorderChars struct + BottomLeft rune + BottomRight rune + Horizontal rune + TopLeft rune + TopRight rune + Vertical rune + type BorderStyle struct + Bottom bool + Chars BorderChars + Left bool + Right bool + Top bool + type Cell struct + Content string + Style *Style + type ColorMode int + const ColorMode16 + const ColorMode256 + const ColorModeNone + const ColorModeTrueColor + func (cm ColorMode) String() string + type Screen struct + Cells [][]Cell + Height int + Previous [][]Cell + Width int + func NewScreen(width, height int) *Screen + func (s *Screen) Clear() + func (s *Screen) Render(node *StyledNode) + func (s *Screen) Resize(width, height int) + func (s *Screen) SetCell(x, y int, content string, style *Style) + func (s *Screen) SetColorMode(mode ColorMode) + func (s *Screen) String() string + type Style struct + Background *color.Color + Blink bool + Bold bool + Border *BorderStyle + BorderColor *color.Color + Dim bool + Foreground *color.Color + Italic bool + Reverse bool + Strikethrough bool + TextAlign TextAlign + TextOverflow TextOverflow + TextWrap TextWrap + Underline bool + func NewStyle() *Style + func (s *Style) WithBackground(c *color.Color) *Style + func (s *Style) WithBold(bold bool) *Style + func (s *Style) WithBorder(chars BorderChars) *Style + func (s *Style) WithBorderColor(c *color.Color) *Style + func (s *Style) WithForeground(c *color.Color) *Style + func (s *Style) WithItalic(italic bool) *Style + func (s *Style) WithTextOverflow(overflow TextOverflow) *Style + func (s *Style) WithUnderline(underline bool) *Style + type StyledNode struct + Children []*StyledNode + Content string + Style *Style + func NewStyledNode(node *layout.Node, style *Style) *StyledNode + func (n *StyledNode) AddChild(child *StyledNode) + type TerminalCapabilities struct + ColorMode ColorMode + IsTTY bool + SupportsAlt bool + func DetectCapabilities() *TerminalCapabilities + type TerminalDimensions struct + CellHeight float64 + CellWidth float64 + Columns int + HasPixelSupport bool + PixelHeight int + PixelWidth int + Rows int + func QueryTerminalDimensions(columns, rows int) TerminalDimensions + func (d TerminalDimensions) String() string + type TextAlign int + const TextAlignCenter + const TextAlignJustify + const TextAlignLeft + const TextAlignRight + type TextOverflow int + const TextOverflowClip + const TextOverflowEllipsis + const TextOverflowEllipsisMiddle + const TextOverflowEllipsisStart + type TextWrap int + const TextWrapBalanced + const TextWrapNone + const TextWrapNormal + const TextWrapPretty