Textarea
Displays a form textarea.
use leptos::prelude::*; use singlestage::Textarea; #[component] pub fn TextareaExample() -> impl IntoView { view! { <form class="w-full"> <Textarea placeholder="Type your message here">"Comments:"</Textarea> </form> } }
Anatomy
Import all parts and piece them together.
use leptos::prelude::*; use singlestage::Textarea; #[component] pub fn TextareaAnatomy() -> impl IntoView { view! { <Textarea /> } }
API Reference
Textarea
Creates a textarea that takes children as a default value.
| Name | Type | Default | Description |
|---|---|---|---|
| default | String | "" | Sets the default value of the element. Setting `value` sets this once at page load. |
| disabled | bool | false | Toggles whether or not the textarea is disabled. |
| invalid | bool | false | Toggles invalid appearance. |
| value | Reactive<String> | "" | Reactive signal coupled to the value of the textarea. |