label: Text label

View source: R/widget-label.R

labelR Documentation

Text label

Description

Text label

Usage

label(text = "", id = NULL, classes = NULL, style = NULL, wrap = NULL)

Arguments

text

A string, a character vector (one element per line), a number, or span()s for styled text. A function of no arguments is re-evaluated whenever the signal()s it reads change.

id

Optional identifier (for ⁠#id⁠ selectors).

classes

Optional classes (for .class selectors).

style

A style().

wrap

Shortcut for style(wrap = ): "none", "word" or "char".

Value

A Label widget. Change its text with ⁠$update()⁠ or by assigning ⁠$text⁠.

Examples

lbl <- label("Hello", style = style(bold = TRUE))
lbl$update("Goodbye")
render_widget(lbl, 10, 1)

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