-
Notifications
You must be signed in to change notification settings - Fork 9
Component TextArea
MeowLynxSea edited this page Jan 24, 2026
·
4 revisions
A multi-line text input.
TextArea owns full text editing state (cursor/selection/marked text) and supports keyboard navigation.
use gpui::ElementId;
use yororen_ui::component::{text_area, EnterBehavior, WrapMode};
let view = text_area()
.key(("settings", "notes"))
.placeholder("Notes")
.wrap(WrapMode::Soft)
.enter_behavior(EnterBehavior::Newline)
.on_change(|value, _window, _cx| {
// ...
});- Multi-line notes/comments
- Text editors for small documents
-
text_area(): constructor -
id(...) / key(...): stable identity placeholder("...")disabled(bool)-
wrap(WrapMode):-
None(default) Soft
-
-
enter_behavior(EnterBehavior):-
Newline(default) SubmitDisabled
-
on_change(|value, window, cx| ...)- Styling:
bg/border/focus_border/text_color/height
- Requires one-time registration via
yororen_ui::component::init(cx).
- Height:
120px - Wrap mode:
WrapMode::None - Enter behavior:
EnterBehavior::Newline
- Use
WrapMode::Softfor note-taking fields. - Use
EnterBehavior::Submitfor chat/command inputs where Enter should submit.
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.