mirror of https://github.com/sveltejs/svelte
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
352 B
17 lines
352 B
6 years ago
|
---
|
||
|
title: Textarea inputs
|
||
|
---
|
||
|
|
||
|
The `<textarea>` element behaves similarly to a text input in Svelte — use `bind:value`:
|
||
|
|
||
|
```html
|
||
|
<textarea bind:value={value}></textarea>
|
||
|
```
|
||
|
|
||
|
In cases like these, where the names match, we can also use a shorthand form:
|
||
|
|
||
|
```html
|
||
|
<textarea bind:value></textarea>
|
||
|
```
|
||
|
|
||
|
This applies to all bindings, not just textareas.
|