docs: describe that `bind:value` creates a two-way binding (#8311)

---------

Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
pull/8326/head
Mike Randazzo 1 year ago committed by GitHub
parent 835362af88
commit 487fedce6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,8 +1,7 @@
---
title: Textarea inputs
---
The `<textarea>` element behaves similarly to a text input in Svelte — use `bind:value`:
The `<textarea>` element behaves similarly to a text input in Svelte — use `bind:value` to create a two-way binding between the `<textarea>` content and the `value` variable:
```html
<textarea bind:value={value}></textarea>
@ -14,4 +13,4 @@ In cases like these, where the names match, we can also use a shorthand form:
<textarea bind:value></textarea>
```
This applies to all bindings, not just textareas.
This applies to all bindings, not just textareas.

Loading…
Cancel
Save