textArea

open fun textArea(state: TextAreaState, viewport: TextAreaViewport, enabled: Boolean, style: TextStyle, wrap: TextWrap, lineSpacing: Int, modifier: Modifier, key: ElementKey<*>?): Element(source)

Creates one profile-backed multiline editor observing caller-owned text and scroll state.

The default implementation rejects this capability so existing runtime implementations remain source and binary compatible. The retained node owns its sole text subscription and must release it on detach or failure. Creating the immutable description does not subscribe to state; the description can be reused after detachment.

Return

an immutable retained-element description referencing but not owning state.

Parameters

state

caller-owned owner-thread canonical multiline text and vertical position.

viewport

exact outer size or visible-row request using the fixed nine-pixel logical line box.

enabled

whether focus, editing, and enabled appearance are active.

style

profile color and shadow policy.

wrap

presentation-only wrapping policy.

lineSpacing

non-negative additional logical pixels between adjacent lines.

modifier

active behavior around the editor.

key

optional stable sibling identity.

Throws

during retained attachment when state is already attached to another retained editor.

when the runtime has not implemented multiline editing.


open fun textArea(state: TextAreaState, viewport: TextAreaViewport, enabled: Boolean, style: TextStyle, font: ResourceId, wrap: TextWrap, lineSpacing: Int, modifier: Modifier, key: ElementKey<*>?): Element(source)

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

The default implementation rejects this capability without opening or retaining font resources. The retained node owns its sole text subscription and must release it on detach or failure. Creating the immutable description does not subscribe to state; the description can be reused after detachment.

Return

an immutable description referencing but not owning state or live font resources.

Parameters

state

caller-owned owner-thread canonical multiline text and vertical position.

viewport

exact outer size or visible-row request using the fixed nine-pixel logical line box.

enabled

whether focus, editing, and enabled appearance are active.

style

profile color and shadow policy.

font

structural identifier resolved against the runtime's pinned font resources.

wrap

presentation-only wrapping policy.

lineSpacing

non-negative additional logical pixels between adjacent lines.

modifier

active behavior around the editor.

key

optional stable sibling identity.

Throws

during retained attachment when state is already attached to another retained editor.

when the runtime has not implemented multiline editing with explicit font selection.


open fun textArea(state: TextAreaState, viewport: TextAreaViewport, appearance: TextInputAppearance, enabled: Boolean, style: TextStyle, wrap: TextWrap, lineSpacing: Int, modifier: Modifier, key: ElementKey<*>?): Element(source)
open fun textArea(state: TextAreaState, viewport: TextAreaViewport, appearance: TextInputAppearance, enabled: Boolean, style: TextStyle, font: ResourceId, wrap: TextWrap, lineSpacing: Int, modifier: Modifier, key: ElementKey<*>?): Element(source)

Creates an editor with an independently resolved frame and editing-decoration appearance. Caller state and font ownership follow the existing editor overload; appearance changes do not reset editing. Default appearance delegates to the legacy overload for compatible third-party runtimes.

Throws

when custom appearance is unavailable in this runtime.