Home > OS >  placeholder textinput not displaying (react native)
placeholder textinput not displaying (react native)

Time:12-19

my placeholder is not displaying in my textinput, can someone help me? I'm using react native

<TextInput
  style={{
    height: "15%",
    margin: 12,
    border: 1,
    borderColor: "white",
    borderStyle: "solid",
    placeholder: "this is a test",
    padding: 10,
    borderRadius: 20,
    width: "70%",
    backgroundColor: "#E5E5E5"
  }}
></TextInput>;

CodePudding user response:

Use directly placeholder property, without passing by css style <TextInput ..... placeholder="your text">

See react native documentation : https://reactnative.dev/docs/textinput

  • Related