<text>
Renders its inner text content (whatever’s between <text> and </text>, after Jinja has expanded it)
as a block of text.
<text x="10" y="10" size="40" font="home/Roboto-Bold.ttf" color="white">
{{ timestamp.strftime('%A, %B %d') }}
</text>
Properties
The tag’s content (the text between <text> and </text>, after Jinja has expanded it) is the string
drawn — it isn’t one of the attributes below. Whitespace from template indentation is included verbatim,
since it’s just XML text content — keep tags tight around the text if stray leading/trailing whitespace
or newlines would matter for width calculations.
- pydantic model todays_paper_web.widgets.core.text.TextParams[source]
Bases:
ViewParams- field font: str | None = None
Path to a .ttf/.otf font file, resolved the same way as any other file the config references. Falls back to the bundled FiraSans at size if unset or unloadable.
color accepts a CSS color name or a #hex code; unlike most other widgets in this reference, an
unrecognized color here raises a render error rather than silently falling back to black (see
Python API reference).
Positioning
<text> doesn’t interpret x, y, align, or valign itself — those are read by whichever container
it’s placed in (<box>, <row>, <column>) to decide where to put the rendered text block, as
ViewParams above already shows. See Layout: box, column, row, screen for exactly how each container uses them.