How do I control the style of an input depending on the focus?

Judit Casacuberta shared this problem 3 months ago
In Progress

I want to change the border of an input depending on the focus, I want the input border to change when the focus isn't on the input. How can I do that?

Use Example:

"Mouse enter" the border becomes visible, if you click on the input the border keeps visible, if you leave the input with the focus still on (your are typing) I want the border to still be visible, but if I click somewhere else (so the focus is not on the input anymore) I want the border to became hidden.


Comments (1)


It sounds like the "On Focus Out" trigger is what you're looking for. With events using that trigger, when you focus out (click out of) an Input, you'll see the action you defined occur (like changing the border).