All my inputs have the options of passing as a prop a "hint", which is a text to make clear to the user what that field is about, how to fill it, etc. I decided this hint shouldn't always apear on screen, only when the input is focused, because in some screens I'll have large forms, and if all fields have a hint, the screen will be polluted.
Now, the problem I am facing is regarding spacing. As you can see in the image below, I have a small form with two fields that have a hint: the last two. The problem is that for the first one, the first input keeps a space prepared for the hint, which makes the UI weird because seems like things are misspaced.
I have considered expanding the hint from heigh 0 to auto to make it visible and not have any additional space when it's not visible, but for larger layouts where I'll have 4 inputs side by side with 4 lines of inputs, that'll cause a great shift in the layout, making all fields shift down by the height of text of the hint of an upper line input.
So, I am searching for better layout strategies.

