TermUI.Widget.Label (TermUI v0.2.0)
View SourceA stateless widget for displaying text.
Label is the simplest widget - it renders text with optional styling, alignment, wrapping, and truncation.
Usage
Label.render(%{text: "Hello, World!"}, area)
Label.render(%{
text: "Centered text",
align: :center,
style: %{fg: :blue, bold: true}
}, area)Props
:text- The text to display (required):align- Text alignment::left,:center,:right(default::left):wrap- Whether to wrap text (default:false):truncate- Whether to truncate with ellipsis (default:true):style- Style options (fg, bg, bold, etc.)