ajonno
ajonno

Reputation: 2240

Position of placeholder text in (multiline) TextInput for Android (React Native)

I've got a multi-line TextInput like so:

<TextInput
  multiline={true}
  placeholder='Enter description...'
  underlineColorAndroid={'transparent'}
>

On iOS it renders the placeholder text nicely per this screenshot. enter image description here

On Android, it's putting the placeholder text as centered vertically! I've checked and there are no styles in any parent component that would force this behavior (again iOS is fine as per the screenshot).

Is there a way to justify that placeholder text to the top of the frame (same as iOS) ? enter image description here

Upvotes: 21

Views: 17847

Answers (1)

ajonno
ajonno

Reputation: 2240

got it, used this prop: textAlignVertical={'top'}

Upvotes: 89

Related Questions