<text-area> element represents multi-line input fields. When pressed, the text area focuses and a keyboard appears to accept user input. The value entered into the
<text-area> gets serialized as form data when a
<form> gets submitted.
<screen> <text-area name="feedback" placeholder="Please leave your feedback" /> </screen>
By default, the text area will appear as one row of text, but will expand vertically to accomodate the entered text.
You can also specify the height of the text area using styles. With a fixed height, the inside of the text area will scroll to show the entered text.
<text-area> element can appear anywhere within a
<text-area> element accepts the standard behavior attributes, including the following triggers:
The name of the text area within a
<form> element. This name will be used when serializing a form to form data that gets sent in a server request.
|string||No (defaults to blank)|
The value of the text area. This string gets rendered into the string and can be edited by the user. Set this value in the XML to pre-populate the text area.
A label that appears within the text area. The placeholder only appears when the text area is empty.
A space-separated list of styles to apply to the element. See Styles. Note that text style rules cannot be applied to an
<text-field> supports the
focused style modifier. See Modifiers for more details.
A global attribute uniquely identifying the element in the whole document.
|false (default), true||No|
hide="true", the element will not be rendered on screen. If the element or any of the element's children have a behavior that triggers on "load" or "visible", those behaviors will not trigger while the element is hidden.
|none (default), none, URL, addressCity, addressCityAndState, addressState, countryName, creditCardNumber, emailAddress, familyName, fullStreetAddress, givenName, jobTitle, location, middleName, name, namePrefix, nameSuffix, nickname, organizationName, postalCode, streetAddressLine1, streetAddressLine2, sublocality, telephoneNumber, username, password, newPassword, oneTimeCode||No|
text-content-type autofills available fields (for example, for iOS 12+
oneTimeCode can be used to indicate that a field can be autofilled by a code arriving in an SMS).