2

enter image description here

I want to change the color of the float name for the input.

i set --border-color: #222428; and this change the color of borders only, i need to change color of the word password and email on hover, showing up floating.

      <ion-input style="margin: 15px; width: auto; --border-color: #222428;" label="Email" label-placement="floating" fill="outline" placeholder="Your Email address"></ion-input>
      <ion-input style="margin: 15px; width: auto; --border-color: #222428;" type="password" label="Password" label-placement="floating" fill="outline" placeholder="Your Password"></ion-input>
      

i try this : (i add color:black in style and the word password dosnt change !)

      <ion-input style="margin: 15px; width: auto; --border-color: #222428; color:black" label="Email" label-placement="floating" fill="outline" placeholder="Your Email address"></ion-input>
      <ion-input style="margin: 15px; width: auto; --border-color: #222428; color:black" type="password" label="Password" label-placement="floating" fill="outline" placeholder="Your Password"></ion-input>
      
0

1 Answer 1

2

See docs: https://ionicframework.com/docs/api/input#css-custom-properties-1

Use: --highlight-color-focused

<ion-input
  style="margin: 15px; width: auto; --border-color: #222428; --highlight-color-focused: #222428"
  label="Email"
  label-placement="floating"
  fill="outline"
  placeholder="Your Email address"
></ion-input>

The input can be valid or invalid, there are properties for this again, maybe you have to set them to the same color or others of your choice.

--highlight-color-invalid and --highlight-color-valid

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.