Textarea
A text field of several lines that can grow with its text, as the value of a List row or on its own.
import { Textarea } from "@plexui/react-native"Examples
Overview
Platforms
| iOS 26 | Android | |
|---|---|---|
| Native component | Text view (multi-line text field) | Text field, multi-line (outlined) |
| In a List row | The row's bare value under its label, 17/22 lines from the text start | The bare 17sp value under the row's label, 20 in |
| On its own | A framed field, its lines 11 from the border | The outlined field, 8dp corners, the label floating on the line in a Field |
API
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Controlled text |
ref | Ref<ComponentRef<typeof TextInput>> | — | The text input itself, for focus(), blur() and clear() |
defaultValue | string | — | Initial text (uncontrolled) |
onChangeText | (text: string) => void | — | Called with the text on every change |
variant | "outline" | "soft" | "ghost" | "outline" | Fill style; ghost has no frame, for a row or a container that frames it |
size | "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "md" | Step of the control scale: the radius, gutter and type of the frame |
rows | number | 3 | Initial row count |
autoResize | boolean | false | Grow and shrink with the text |
maxRows | number | — | Max rows with autoResize; defaults to the larger of rows and 10 |
autoSelect | boolean | false | Select all the text when it takes focus |
disabled | boolean | false | Dims the textarea and takes no input |
readOnly | boolean | false | Keeps the value |
invalid | boolean | false | Draws it in the error color |
placeholder | string | — | Shown while the textarea is empty |
style | StyleProp<ViewStyle> | — | Style of the field's box |
testID | string | — | Test id |
Every other prop of React Native's TextInput passes through (maxLength, autoCapitalize, onFocus, onBlur and so on).