v0.8+
The weex builtin component textarea
is used to create interactive controls to accept data from users. It can be a multi-line input.
Notes: <textarea>
support all event which <input>
had.
This component supports no child components.
value
: <string> the value of the control.placeholder
: <string> a hint to the user of which can be entered to the control. The placeholder text must have no carriage returns or line-feeds.disabled
: <boolean> a boolean attribute indicates that the form control is not available for interaction. In particular, the click event will not be dispatched on disabled controls.autofocus
: <boolean> a boolean attribute lets you specify that a form control should have input focus when the page loads.rows:
<number> a number which can specify the height of textarea, default is 2
.Other attributes please check out the common attributes.
text styles: checkout text styles
color
style.font-size
style.font-style
style.font-weight
style.text-align
style.common styles: check out common styles for components
position
related styles.opacity
, background-color
etc.input
: the value of an element changes.change
: the change event is fired when a change to the component's value is commited by the user. It always come after a blur
event.focus
: a component has received focus.blur
: a component has lost focus.common events: check out the common events
appear
/ disappear
event. Check out common events.Notes: <textarea>
does not support the common-event click
. Please listen to the input
or change
event instead.
input
and change
events:value
: the value of the component who dispatched this event.timestamp
: the time stamp of the event.focus
and blur
events:timestamp
: the time stamp of the event.<div> <textarea autofocus="true" placeholder="..." value="I am a multiple input"> </textarea> </div>