Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

155
Vistas
Placeholder in TextInput is not displaying any texts

My placeholder is not displaying the Placeholder text. Text input is displayed. Placeholder text is also displayed while i am running on emulator. But when i install and run the code on my device. It doesnot display any placeholder text.

Here is my code

<View style={styles.root}>
<Text style={styles.title}>Create an account</Text>
            <CustomInput
                placeholder="Username"
                value={userName}
                setValue={setUserName}
            />
</View>

Stylesheet looks like this:

const styles = StyleSheet.create({
    root: {
        alignItems: 'center',
        padding: 20
    },
    title:{
        fontSize: 24,
        fontWeight: 'bold',
        color: '#051c60',
        margin:10
    }
})

;

Custom Input section looks like this:

import { View, TextInput, StyleSheet } from 'react-native'
import React from 'react'

const CustomInput = ({value, setValue, placeholder, secureTextEntry}) => {
  return (
    <View style={styles.container}>
        <TextInput
            placeholder={placeholder}
            value={value}
            onChangeText={setValue}
            style={styles.input}
            secureTextEntry={secureTextEntry}
        />
    </View>
  )
}

const styles = StyleSheet.create({
    container:{
        backgroundColor:'white',
        width: '100%',
        borderColor:'#e8e8e8',
        borderWidth:1,
        borderRadius:5,
        paddingHorizontal:10,
        marginVertical:5,
    },
    input:{
        fontSize:16,
        color:'#000',
        paddingVertical:10,
    }
})

export default CustomInput;
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

use placeholderTextColor Example: <TextInput placeholderTextColor="#ccc" ... />

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda