[SOLVED] TextInput placeHolder Alignment


What is the best way to align the placeholder text for TextInput component? I have already attempted to use the styles component as described below. There doesn’t seem to be a property for this.

render() {
    return (
        <View style={styles.container}>
                onChangeText={(text) => this.setState({
                    username: text
                placeholder='Add Username'


const styles = StyleSheet.create({
 container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
 textInput: {
    height: 40,
    width: 200,
    justifyContent: 'center',
    alignItems: 'center',
    alignSelf: 'center',
    borderColor: 'gray',
    borderWidth: 1,



Add textAlign: 'center' to your textInput style.

Answered By – Daniel Basedow

Answer Checked By – Pedro (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published.