textarea is an input multi-line component in HTML. It is used to input forms in web applications to take input from a user.
This can be created in HTML as follows
<textareaplaceholder="Please enter comments"></textarea>
In this article, How to implement textarea two input binding with v-model and input binding, and text area example usage.
Simple TextArea example vuejs
Like any input form control, Textarea values are mapped to the Vue component instance using the v-model directive.
Vue provides two-way binding using the v-model directive which passes data from form input control to/from the controller.
In the below Vue component
Declared Textarea in a template of the Vue component
Added v-model to have a two-way binding from template to/from a script
Declared message property which configured in the v-model attribute in the data function
v-model provides two-way data binding, The same can be achieved with :value and @input ie.Textarea input binding:value provides read the value from input ie one-way binding
@input allows setting value to an input text area.
This way we can achieve two-way binding without v-model