<t-text>

A piece of text the reader clicks to rewrite. Its variable holds a string.

Dear reader, this page has been waiting for you. In capitals: , which is letters long (previously ).

The element's text is the starting value, and also what readers see without JavaScript.

Attributes

AttributeDefaultDescription
namerequiredThe variable that holds the text.
valuetext contentThe starting value.
formatHow the text is displayed, for example "“%s”". See formats.
coloraccent colorOne CSS color, or two for light and dark mode.
labelthe nameThe accessible name.
previousA variable to hold the text from before the last committed edit.

Interaction

InputEffect
Click, Enter or SpaceOpens a field to type new text.

In the field, the variable updates live as you type. Enter (or clicking away) commits the change, and Esc cancels and restores the text from before you opened it. Unlike <t-num>, the field keeps exactly what's typed: it doesn't evaluate expressions.

Inside a <t-call>, a <t-text> is a string argument and gets quotes.