question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiline TextInput is not centering text or placeholder vertically

See original GitHub issue

Description

Hi, I’m trying to center the text into a multiline text input but seems like its not possible.

Reproduction Steps and Sample Code

<TextInput style={styles.inputStyle} placeholder="Type Answer" multiline />

inputStyle: { flex: 1, justifyContent: 'center', alignItems: 'center' textAlign: 'center', fontSize: 16 },

Additional Information

  • React Native version: 0.43
  • Platform: [Both]
  • Development Operating System: [MacOs]
  • Dev tools: [Android SDK 23]

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

29reactions
hramoscommented, Apr 24, 2017

This issue looks like a question that would be best asked on StackOverflow.

StackOverflow is amazing for Q&A: it has a reputation system, voting, the ability to mark a question as answered. Because of the reputation system it is likely the community will see and answer your question there. This also helps us use the GitHub bug tracker for bugs only.

Will close this as this is really a question that should be asked on StackOverflow.

10reactions
pyjaccommented, May 28, 2017

Having a similar issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to align text input correctly in react native? - Stack Overflow
As we said, multiline={true} vertically aligns the text. · To avoid adding a new line after pressing the submit button, you need blurOnSubmit={true}...
Read more >
Guys how do you manage text vertical alignment for TextInput ...
justifyContent aligns along the main axis, which by default is vertical. So just put the text input in a parent view with that...
Read more >
Text Input — Kivy 2.1.0 documentation
The TextInput widget provides a box for editable plain text. Unicode, multiline, cursor navigation, selection and clipboard features are supported.
Read more >
:placeholder-shown - CSS: Cascading Style Sheets | MDN
The :placeholder-shown CSS pseudo-class represents any or element that is currently displaying placeholder text.
Read more >
Text Align - Tailwind CSS
Control the text alignment of an element using the text-left , text-center , text-right , and text-justify utilities. So I started to walk...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found