TextArea

@JvmName(name = "TextAreaStatec0abf0512fec_1")
fun UiScope.TextArea(state: TextAreaState, viewport: TextAreaViewport, enabled: StateSource<Boolean>, textStyle: TextStyle = TextStyle.TextField, wrap: TextWrap = TextWrap.Word, lineSpacing: Int = 0, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)
@JvmName(name = "TextAreaStatec701b9e2eaf6_1")
fun UiScope.TextArea(state: TextAreaState, viewport: TextAreaViewport, font: ResourceId, enabled: StateSource<Boolean>, textStyle: TextStyle = TextStyle.TextField, wrap: TextWrap = TextWrap.Word, lineSpacing: Int = 0, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)
@JvmName(name = "TextAreaState80c0b5b4cb37_1")
fun UiScope.TextArea(state: TextAreaState, appearance: TextInputAppearance, viewport: TextAreaViewport, enabled: StateSource<Boolean>, textStyle: TextStyle = TextStyle.TextField, wrap: TextWrap = TextWrap.Word, lineSpacing: Int = 0, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)
@JvmName(name = "TextAreaState4da1faac4769_1")
fun UiScope.TextArea(state: TextAreaState, appearance: TextInputAppearance, viewport: TextAreaViewport, font: ResourceId, enabled: StateSource<Boolean>, textStyle: TextStyle = TextStyle.TextField, wrap: TextWrap = TextWrap.Word, lineSpacing: Int = 0, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Observes enabled for TextArea at the next owner-thread frame cutoff.

Retain caller-owned sources and editing state outside reevaluation. See Observe for shared snapshots, equal-value suppression, and cleanup; literal arguments follow TextArea. Modifiers and parent data apply to the actual component, while the binding owns its sibling key.


fun UiScope.TextArea(state: TextAreaState, viewport: TextAreaViewport, enabled: Boolean = true, textStyle: TextStyle = TextStyle.TextField, wrap: TextWrap = TextWrap.Word, lineSpacing: Int = 0, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Emits one multiline editor with independently placeable vertical scrolling.

Editing and deletion preserve Unicode scalars while TextAreaState.maxLength counts UTF-16 code units after newline normalization. Soft wrapping does not insert line breaks into state, and delivered IME preedit remains presentation until committed input arrives. An external Scrollbar may share TextAreaState.scrollState; the editor does not add its own scrollbar. This component does not add selection, clipboard commands, or grapheme-cluster editing. Description creation does not claim state; the retained editor claims its sole text subscription on attachment. The immutable description can be reused after detachment, but simultaneous attachment with the same state is rejected.

Receiver

active owner-thread screen scope.

Parameters

state

caller-owned text and scroll position observed by one retained editor.

viewport

exact outer size or requested count of visible text rows.

enabled

whether focus and editing are accepted.

textStyle

profile-backed color and shadow policy.

wrap

presentation-only wrapping policy.

lineSpacing

non-negative additional logical pixels between adjacent lines.

modifier

active layout, input, and typed action behavior.

key

optional stable sibling identity.

Throws

when lineSpacing is negative or the requested viewport cannot contain the editor.

when the scope or state thread is invalid or no runtime evaluation is active; retained attachment also throws when state is already attached to another retained editor.

when the active runtime does not support multiline editing.


fun UiScope.TextArea(state: TextAreaState, viewport: TextAreaViewport, font: ResourceId, enabled: Boolean = true, textStyle: TextStyle = TextStyle.TextField, wrap: TextWrap = TextWrap.Word, lineSpacing: Int = 0, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Emits one multiline editor using an explicitly selected resource-pack font.

The selected font supplies layout, drawing, cursor, and scroll metrics from the runtime's pinned resource state. Text, IME, scrolling, scalar editing, and ownership follow the default-font TextArea contract. Description creation does not claim state; the retained editor claims its sole text subscription on attachment. The immutable description can be reused after detachment, but simultaneous attachment with the same state is rejected.

Receiver

active owner-thread screen scope.

Parameters

state

caller-owned text and scroll position observed by one retained editor.

viewport

exact outer size or requested count of visible text rows.

font

structural identifier of the font definition.

enabled

whether focus and editing are accepted.

textStyle

profile-backed color and shadow policy.

wrap

presentation-only wrapping policy.

lineSpacing

non-negative additional logical pixels between adjacent lines.

modifier

active layout, input, and typed action behavior.

key

optional stable sibling identity.

Throws

when lineSpacing is negative or the requested viewport cannot contain the editor.

when the scope or state thread is invalid or no runtime evaluation is active; retained attachment also throws when state is already attached to another retained editor.

when the active runtime does not support multiline editing with explicit font selection.


fun UiScope.TextArea(state: TextAreaState, appearance: TextInputAppearance, viewport: TextAreaViewport, enabled: Boolean = true, textStyle: TextStyle = TextStyle.TextField, wrap: TextWrap = TextWrap.Word, lineSpacing: Int = 0, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)
fun UiScope.TextArea(state: TextAreaState, appearance: TextInputAppearance, viewport: TextAreaViewport, font: ResourceId, enabled: Boolean = true, textStyle: TextStyle = TextStyle.TextField, wrap: TextWrap = TextWrap.Word, lineSpacing: Int = 0, modifier: Modifier = Modifier.Empty, key: ElementKey<*>? = null)(source)

Emits a retained TextArea with a per-editor appearance. Geometry, state ownership, font, wrapping, and input behavior follow the corresponding ordinary overload. Appearance images are resolved at evaluation; invalid nine-slice borders fail before a frame is presented. Keep state and images outside reevaluated content. Appearance-only changes preserve focus, composition, and scroll. Use TextStyle.ContainerLabel for dark text on light frames; the appearance controls caret and composition colors.

Throws

when the installed runtime lacks custom appearance support.