Skip to main content

TextField

A controlled single-line editor.

Props​

PropTypeRequired
accessibilityHintstringNo
autocorrectbooleanNo
contentTypestringNo
descriptionnullableStringNo
enabledbooleanNo
keyboardstringNo
labelstringNo
placeholderstringNo
presentationstringNo
securebooleanNo
semanticsstringNo
validationMessagenullableStringNo
valuestringNo

Types describe evaluated values. Literal native attributes use the declared decoder; use bind-* for expressions. any still has the semantic constraints listed below. Common document attributes (class, state, show, etc.) are separate from props.

Example​

<Column state="{name:''}"><TextField label="Name" model="name" /></Column>

Defaults, values, and validation​

value defaults to an empty string. presentation accepts labeled/editor. keyboard and contentType use the supported input conventions. Explicit labels remain necessary even with a placeholder. focus/blur are local commands.

Unknown props, wrong types, missing required props, and unsupported child structure fail validation. Use attributes for evaluated input and diagnostics for recovery.

Events​

on-change, on-submit

change carries {value: ...} with the controlled value. See this primitive’s value rules; model assigns this field before the explicit handler.

submit carries {value: text}.

Local commands​

blur, focus

Keyboard values: default/email/number/decimal/phone. Content types: none/name/email/username/password/newPassword/oneTimeCode. Password content types require secure editing; use TextField for secure single-line entry.

Native primitive index · Events · Host APIs