React Native MantineInputs

Textarea

Multi-line text input with auto-resize

Import: import { Textarea } from 'react-native-mantine';

Usage

import { Textarea } from 'react-native-mantine';

<Textarea
  label="Description"
  placeholder="Enter your description..."
  minRows={4}
  onChangeText={setText}
/>

Props

PropTypeDefaultDescription
minRowsnumber3Minimum number of visible text lines. Controls the minimum height of the textarea
maxRowsnumberMaximum number of visible text lines. When autosize is enabled, textarea will not exceed this height
autosizebooleanfalseIf true, textarea height automatically adjusts to fit content between minRows and maxRows
labelReact.ReactNodeInput label displayed above the textarea field
descriptionReact.ReactNodeDescription text displayed below the label and above the textarea
errorReact.ReactNodeError message displayed below the textarea. When set, textarea border becomes red
size'xs' | 'sm' | 'md' | 'lg' | 'xl''sm'Textarea size that controls font size and padding
radiusnumber | "xs" | "sm" | "md" | "lg" | "xl"'sm'Key of theme.radius or any valid number to set border-radius
iconReact.ReactNodeIcon displayed on the left side of the textarea field
requiredbooleanfalseDisplays a red asterisk (*) after the label to indicate field is required
variant'default' | 'filled' | 'unstyled''default'Controls textarea appearance: default (outlined), filled (background), or unstyled (no borders)
placeholderstringPlaceholder text displayed when textarea is empty
valuestringTextarea value for controlled component
onChangeText(text: string) => voidCallback fired when textarea value changes
onBlur() => voidCallback fired when textarea loses focus
editablebooleantrueIf false, textarea is read-only and cannot be edited
autoCapitalize'none' | 'sentences' | 'words' | 'characters''sentences'Controls automatic capitalization behavior
styleViewStyleAdditional styles applied to the textarea element itself
wrapperStyleViewStyleAdditional styles applied to the wrapper container

Source on GitHub · npm