Reflex Cloud - Fast, secure & scalable hosting. One command to deploy.

Text Area

A text area is a multi-line text input field.

Basic Example

The text area component can be controlled by a single value. The on_blur prop can be used to update the value when the text area loses focus.

Hello World!

Text Area in forms

Here we show how to use a text area in a form. We use the name prop to identify the text area in the form data. The form data is then passed to the submit_feedback method to be processed.

Are you enjoying Reflex?

API Reference

rx.text_area

The input part of a TextArea, may be used by itself.

PropType | ValuesDefaultInteractive
size
"1" | "2" | ...
variant
"classic" | "surface" | ...
resize
"none" | "vertical" | ...
color_scheme
"tomato" | "red" | ...
radius
"none" | "small" | ...
auto_complete
bool
auto_focus
bool
dirname
str
disabled
bool
form
Union[str, int, bool]
max_length
int
min_length
int
name
str
placeholder
str
read_only
bool
required
bool
rows
str
value
str
wrap
str

Event Triggers

See the full list of default event triggers
TriggerDescription
on_focusFunction or event handler called when the element (or some element inside of it) receives focus. For example, it is called when the user clicks on a text input.
on_blurFunction or event handler called when focus has left the element (or left some element inside of it). For example, it is called when the user clicks outside of a focused text input.
on_changeThe on_change event handler is called when the value or checked state of the component changes.
on_key_downThe on_key_down event handler is called when the user presses a key.
on_key_upThe on_key_up event handler is called when the user releases a key.