TextArea
ion-textarea
is is used for multi-line text inputs. Ionic still
uses an actual <textarea>
HTML element within the component,
however, with Ionic wrapping the native HTML textarea element then
Ionic is able to better handle the user experience and interactivity.
Not that <ion-textarea>
must load its value from the value
or
[(ngModel)]
attribute. Unlike the native <textarea>
element,
<ion-textarea>
does not support loading its value from the
textarea's inner content.
When requiring only a single-line text input it's recommended
to use <ion-input>
instead.
Component
selector: ion-textarea
Usage
<ion-item>
<ion-label>Comments</ion-label>
<ion-textarea></ion-textarea>
</ion-item>
<ion-item>
<ion-label stacked>Message</ion-label>
<ion-textarea [(ngModel)]="msg"></ion-textarea>
</ion-item>
<ion-item>
<ion-label floating>Description</ion-label>
<ion-textarea></ion-textarea>
</ion-item>