-
Notifications
You must be signed in to change notification settings - Fork 9
Component TextArea
MeowLynxSea edited this page Jun 18, 2026
·
4 revisions
A multi-line text input. Paste keeps newlines (unlike TextInput, which strips them).
use yororen_ui::headless::text_area::text_area;
text_area("bio")
.placeholder("Tell us about yourself…")
.max_length(2048)
.on_change({
let entity = cx.entity();
move |new: &str, _, cx| entity.update(cx, |s, _| s.bio = new.to_string());
})
.render(cx, window)| Method | Purpose |
|---|---|
placeholder(text) |
Hint shown when empty. |
max_length(n) |
Hard cap on UTF-8 byte length. |
disabled(v) |
Disable interaction. |
on_change(closure) |
Fn(&str, &mut Window, &mut App) + 'static + Send + Sync. |
has_custom_bg(v) / custom_bg(hsla)
|
Override background. |
has_custom_border(v) / custom_border(hsla)
|
Override border. |
has_custom_focus_border(v) / custom_focus_border(hsla)
|
Override focus border. |
custom_text_color(hsla) |
Override text color. |
Factory takes (id) only. .render(cx, window) returns AnyElement. on_change receives &str — convert with .to_string(). The boot step from TextInput covers this component too.
See also: TextInput, SearchInput, Form.
Yororen UI v0.3.0 · repository · Apache-2.0 · This wiki documents Yororen UI v0.3.0.
This wiki documents Yororen UI v0.3.0 — the headless-core, swappable-renderer build.