mirror of
https://github.com/sveltejs/svelte.git
synced 2024-11-29 16:36:44 +01:00
docs: describe that bind:value
creates a two-way binding (#8311)
--------- Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
This commit is contained in:
parent
835362af88
commit
487fedce6c
@ -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…
Reference in New Issue
Block a user