TextArea
TextArea allows users to enter and edit multiline text content.
Installation
Usage
Props
TextArea
Extends React Native's TextInput props.
Prop | Type | Default | Description |
---|---|---|---|
label | string | - | Label text displayed above the textarea. |
helperText | string | - | Helper text displayed below the label. |
error | boolean | false | When true, displays error styling. |
maxLength | number | - | Maximum number of characters allowed. |
value | string | '' | The current value of the textarea. |
disabled | boolean | false | When true, prevents user interaction. |
className | string | - | Additional Tailwind classes to apply. |
Examples
Default TextArea
With Helper Text
With Error State
Disabled State
Styling
The TextArea component uses Tailwind CSS classes for styling. Default styling includes:
- Container width: 329px
- Minimum height: 160px
- Base text size with 24px line height
- Rounded corners (6px)
- 2px border width
- Consistent padding (8px 12px)
- White background
- Base ink text color
- Gray placeholder color
- Error state styling
- Disabled state styling with lighter background
States
The textarea has several visual states:
- Default: White background with base ink border
- Focused: Primary color border
- Error: Error color border
- Disabled: Light gray background with reduced opacity
Accessibility
The TextArea component:
- Uses semantic text input structure
- Provides clear labeling
- Supports screen readers
- Maintains proper text contrast
- Includes helper text for additional context
- Shows error states clearly
- Supports keyboard navigation