Textarea

Form

A styled multi-line text editor wrapping Iced's text_editor widget.

Preview

Usage

textarea.rs
use floe_ui::components::textarea;
use iced::widget::text_editor;

"text-zinc-500">// Create editor content in your state
let content = text_editor::Content::new();

"text-zinc-500">// Create styled textarea
let editor = textarea::styled(&self.content, Message::EditorAction, &tokens);

API Reference

Props / Parameters

NameTypeDescription
content&text_editor::ContentEditor content state
on_actionFn(Action) -> MessageCallback on editor actions
tokens&DesignTokensDesign tokens for theming

Style Functions

default_style(tokens)

Style functions return closures compatible with Iced's .style() method.

Builder Functions

styled(content, on_action, tokens)

Builder functions return pre-configured Iced widgets ready for use.

Source: floe-ui/src/components/textarea.rs