Search code examples
angularinputprimeng

Primeng Input placeholder doesn't show by default and showing up only after a click


Primeng input field placeholder is visible only after clicking on it. We have this issue only after upgrading from PrimeNg 13 to 15.

<input type="text" placeholder="Some text" />

Solution

  • Resolved this issue by adding a opacity

    .p-float-label {
        input {
            &::placeholder {
                opacity: 1;
            }
        }
    }