• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Pruebas Online
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

290
Vistas
React Native Paper text input: Why is my textInput so tall?

Im trying to add a textinput to my react native app using react-native-paper, but it keeps rendering as a very tall box instead of horizontal. What am I doing wrong?

screenshot of rendered textbox

    import { StyleSheet, Text, View } from "react-native";
    import { TextInput } from "react-native-paper";
    import { useState } from "react";
    
    export default function SignUp() {
    return (
        <View style={styles.container}>
          <Text>SIGN UP! NOW~~!!</Text>
          <TextInput mode="outlined" style={styles.inp} />
        </View>
      );
    }
    
    const styles = StyleSheet.create({
      container: {
        flex: 1,
        alignItems: "center",
        justifyContent: "center",
      },
      inp: {
        height: 1,
      },
    });
almost 3 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I think this is some type of bug exclusive to android, because on both web and ios it doesnt occur. A workaround would be to include a width along with your height, or to wrap the TextInput in a View (this caused weird spacing behavior) so I would just define a width:

 const styles = StyleSheet.create({  
      inp: {
        height: 1,
        width:'100%'
      },
    });
almost 3 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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda