Text

@JvmName(name = "TextUiTextSource")
fun UiScope.Text(text: StateSource<UiText>, layout: TextLayout = TextLayout.SingleLine, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Emits source-backed text using the same frame snapshot and retained-region ownership as Observe. The caller owns the source; text resolution and wrapping happen on the tree owner thread. The complete modifier chain stays on the actual text node; the transparent region owns the sibling key and delegates parent data.


@JvmName(name = "TextStringSource")
fun UiScope.Text(text: StateSource<String>, layout: TextLayout = TextLayout.SingleLine, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Literal source overload of Text with the same frame, layout, ownership, and failure contracts.


@JvmName(name = "TextUiTextSource")
fun UiScope.Text(text: StateSource<UiText>, font: ResourceId, layout: TextLayout = TextLayout.SingleLine, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Source-backed text using an explicit font; nested font selections retain their existing precedence.


@JvmName(name = "TextStringSource")
fun UiScope.Text(text: StateSource<String>, font: ResourceId, layout: TextLayout = TextLayout.SingleLine, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Literal source-backed text with an explicit font and the same retained observation contract.


fun UiScope.Text(text: UiText, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Emits one single-line profile-backed text component.

Receiver

active owner-thread screen scope.

Parameters

text

unresolved text retained for drawing and semantics.

style

profile-backed color and shadow policy.

modifier

active behavior applied to the text.

key

optional stable sibling identity.

Throws

when the profile cannot render text.

when no runtime screen evaluation is active.


fun UiScope.Text(text: String, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Emits one literal single-line profile-backed text component.

Receiver

active owner-thread screen scope.

Parameters

text

literal converted to UiText.Literal.

style

profile-backed color and shadow policy.

modifier

active behavior applied to the text.

key

optional stable sibling identity.

Throws

when the profile cannot render text.

when no runtime screen evaluation is active.


fun UiScope.Text(text: UiText, font: ResourceId, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Emits one single-line text component using an explicitly selected resource-pack font.

The selected font is retained in UiText.WithFont; resource resolution belongs to the active runtime. An inner UiText.WithFont keeps its own selection instead of inheriting font.

Receiver

active owner-thread screen scope.

Parameters

text

unresolved text retained for drawing and semantics.

font

structural identifier of the font definition.

style

profile-backed color and shadow policy.

modifier

active behavior applied to the text.

key

optional stable sibling identity.

Throws

when the profile cannot render text.

when no runtime screen evaluation is active.


fun UiScope.Text(text: String, font: ResourceId, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Emits one literal single-line text component using an explicitly selected resource-pack font.

Receiver

active owner-thread screen scope.

Parameters

text

literal converted to UiText.Literal.

font

structural identifier of the font definition.

style

profile-backed color and shadow policy.

modifier

active behavior applied to the text.

key

optional stable sibling identity.

Throws

when the profile cannot render text.

when no runtime screen evaluation is active.


fun UiScope.Text(text: UiText, layout: TextLayout, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Emits one profile-backed text component with an explicit single-line or multiline layout.

Multiline layout interprets supported line separators, wraps only at Unicode scalar boundaries, and retains the complete source for semantics. It changes presentation without editing the supplied text or adding selection and clipboard behavior.

Receiver

active owner-thread screen scope.

Parameters

text

unresolved text retained for drawing and semantics.

layout

explicit wrapping, line-count, overflow, and line-spacing policy.

style

profile-backed color and shadow policy.

modifier

active layout and behavior applied to the text.

key

optional stable sibling identity.

Throws

when the active profile cannot render text or the requested layout is incompatible with its constraints.

when no runtime screen evaluation is active.

when the active runtime does not support the requested layout.


fun UiScope.Text(text: String, layout: TextLayout, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Literal overload of Text with the same explicit layout, ownership, and failure contract.


fun UiScope.Text(text: UiText, layout: TextLayout, font: ResourceId, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Emits explicitly laid-out text using a selected resource-pack font.

The font is retained in UiText.WithFont; inner font selections retain precedence. Resolution and any glyph resources belong to the active runtime, not this API description.

Receiver

active owner-thread screen scope.

Parameters

text

unresolved text retained for drawing and semantics.

layout

explicit wrapping, line-count, overflow, and line-spacing policy.

font

structural identifier of the font definition.

style

profile-backed color and shadow policy.

modifier

active layout and behavior applied to the text.

key

optional stable sibling identity.

Throws

when the active profile cannot render text or the requested layout is incompatible with its constraints.

when no runtime screen evaluation is active.

when the active runtime does not support the requested layout.


fun UiScope.Text(text: String, layout: TextLayout, font: ResourceId, style: TextStyle = TextStyle.Normal, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Literal overload of Text with the same explicit layout and font-selection contract.