TextInput label is center aligned for multiline textInputs
See original GitHub issueEnvironment
react-native-paper: “3.6.0” iOS: 13.3.1
Description
Label for multiline Textareas are aligned to the center. I expected the label to be aligned to the top. I don’t see a prop to style label for Textinput either.
Reproducible Demo
import { TextInput } from 'react-native-paper';
export default class MyComponent extends React.Component {
state = {
text: ''
};
render(){
return (
<TextInput
label='Email'
value={this.state.text}
multiline
onChangeText={text => this.setState({ text })}
style={{height:400}}
/>
);
}
}```
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
How to align text input correctly in react native?
I have found the solution that in Android, TextInput style textAlignVertical: 'top' ... Update 2015-07-03: multiline text inputs have now been merged:.
Read more >TextInput
A foundational component for inputting text into the app via a keyboard. Props provide configurability for several features, ...
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 >Text input control in Power Apps
AccessibleLabel – Label for screen readers. Align – The location of text in relation to the horizontal center of its control.
Read more >Text in Compose - Jetpack
The following samples show how multi-line text looks with various LineHeightStyle.Trim configurations when alignment is centered ( LineHeightStyle.
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 FreeTop 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
Top GitHub Comments
Hi.
Can you use the render props ?
below example code.
I hope will be applied in the textInput style attribute of the react native paper.
This issue is still occurring. However,
mode="outlined"
along withmultiline
andnumberOfLines
seemed to fix this issue for me on Android.