render_text: Render a widget tree as plain text

View source: R/export.R

render_textR Documentation

Render a widget tree as plain text

Description

Static renderers use the normal layout and paint pipeline and do not start an event loop or write to a terminal.

Usage

render_text(x, width = 80, height = 24, trim = TRUE)

render_lines(x, width = 80, height = 24, trim = TRUE)

Arguments

x

A widget, Screen, App, or ScreenBuffer.

width, height

Frame size in cells.

trim

Remove trailing spaces from each line?

Value

render_text() returns one string separated by newlines; render_lines() returns one string per row.

Examples

render_text(panel(label("Finished"), title = "Job"), width = 20, height = 5)

termr documentation built on Oct. 21, 2026, 5:13 p.m.