Multiline TextInput is not centering text or placeholder vertically
See original GitHub issueDescription
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:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
Having a similar issue.