Raxol. Core. Renderer. View. Components. Text
(Raxol v2.6.0)
View Source
Handles text rendering for the Raxol view system. Provides text styling, wrapping, and alignment functionality.
Summary
Functions
Creates a new text view.
Options
:fg- Foreground color:bg- Background color:style- List of style atoms (e.g., [:bold, :underline]):align- Text alignment (:left, :center, :right):wrap- Text wrapping mode (:none, :char, :word):link- OSC 8 hyperlink URL; makes the text cmd-clickable in terminals that support OSC 8 (iTerm2, kitty, WezTerm, ...)
Examples
Text.new("Hello, World!", fg: :red, style: [:bold])
Text.new("Centered text", align: :center)
Text.new("0x7f3a..e21", link: "https://basescan.org/tx/0x7f3a..e21")
Renders text with the given options and width.