Skip to content

TextArea

The multiline text-editing primitive, with the same controlled value contract as Input.

Loading interactive demo…

#Import

Import text_area from quickgui.

use quickgui::*;

#Usage

text_area(notes.as_str())
    .placeholder("Notes")
    .on_input(edit)

#API reference

Expand an entry for its description and complete signature. A dash means no declaration default is documented.

text_area

View source
pub fn text_area(value: impl Into<Arc<str>>) -> Element

Create a controlled, multiline text area with web-style soft wrapping. Attach a stable [`crate::InputListener`] with [`Element::on_input`]. Use [`Element::no_wrap`] for code-editor-style horizontal scrolling.

on_inputpub fn on_input<V>(mut self, listener: crate::InputListener<V>) -> Self—

Attach a controlled-value listener registered by [`crate::ViewContext::input_listener`].

pub fn on_input<V>(mut self, listener: crate::InputListener<V>) -> Self
View source
placeholderpub fn placeholder(mut self, placeholder: impl Into<Arc<str>>) -> Self—

Set placeholder text for a [`text_input`] element.

pub fn placeholder(mut self, placeholder: impl Into<Arc<str>>) -> Self
View source
childpub fn child(mut self, child: impl IntoElement) -> Self—

Configures child for this part.

pub fn child(mut self, child: impl IntoElement) -> Self
View source