Topic: Change placeholder color of mdb input

Rogelio Sanchez free asked 4 years ago

**Expected behavior** I want to be able to change the color of the placeholder in mdb input. **Actual behavior** I tried to change it through css but it's not working. **Resources (screenshots, code snippets etc.)** I tried this

 .md-form input::placeholder {
    color: white;

ALSO How is it that I'm a pro user but I don't have premium support? Quality Question Screenshot and when I clic to switch to vue version, it redirects to vue documentation. enter image description here

Mikołaj Smoleński staff answered 4 years ago

Hi Rogelio,

Your code is correct. I've just tested it. Maybe You have to remove scoped attribute from You style tag:

.md-form input::placeholder {
  color: red;

According to premium support - it's a different thing. While purchasing PRO package You're still PRO user. You can buy PREMIUM support additionaly if You want to, but in most cases we answer all of the Vue questions each working day.

Best regards

rtg priority commented 7 months ago

It's the input label (.form-outline .form-control.form-control-lg ~ .form-label text) which acts as the placeholder text in MDBInput though.. and that's what requires styling..

Also I think the use of :deep() would probably be preferable in most situations, instead of unscoping the whole component

Interested in your feedback though

wodnikk free answered 4 years ago

Hi there @Rogelio Sanchez,

You can try to style the text input placeholders' using

#yourinputid::placeholder {
    color: pink;

Remember to remove the scoped <style> tag attribute to be able to reach down to the input!


Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • User: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 5.1.1
  • Device: Mac
  • Browser: Google Chrome
  • OS: macOs High Sierra
  • Provided sample code: No
  • Provided link: No