Textarea
A multi-line text input for longer content like messages, descriptions, and comments.
Primitive: TextAreaARIA: role="textbox"
textarea.rs
use stratum_leptos::*;
view! {
<Textarea
placeholder="Write your message..."
rows=4
/>
}Installation
stratum add textareaProps
| Prop | Type | Default | Description |
|---|---|---|---|
| value | Option<String> | None | Controlled value |
| placeholder | Option<String> | None | Placeholder text |
| rows | Option<u32> | None | Visible row count |
| disabled | bool | false | Prevents interaction |
| readonly | bool | false | Prevents editing |
| required | bool | false | Required for form validation |
| resize | ResizeMode | Vertical | Resize behavior: None, Vertical, Horizontal, Both |
| on_change | Option<Callback<String>> | None | Fires on value commit |
Accessibility
- Renders as
<textarea>withrole="textbox". - Supports
aria-disabled,aria-readonly,aria-required.