@younes-atyq
Posted
Hi, great job!
I recently watched Kevin's video addressing the same issue you encountered but in vanilla css.
I searched for that pseudo element in Tailwind CSS but couldn’t find it. If it hasn’t been added yet, you can always incorporate a custom CSS code into your project.
Additionally, it’s advisable to set a fixed height for your form elements. This way, when an error message appears, it won’t push the rest of the content down.
Marked as helpful
@mofada
Posted
@younes-atyq Great, :user-valid
can help me, but it is too new and the compatibility is slightly poor.
Regarding the issue of fixed height, your suggestion is correct, but in the UI design draft, the spacing in the error state is different from the spacing in the normal state. If it is developed according to the UI, I think non-fixed may be closer to the UI.
@younes-atyq
Posted
@mofada While I agree that consistent spacing is crucial for a visually balanced design, I believe the advantages of avoiding disruptive content shifts in the error state through increased spacing in the normal state outweigh the potential drawbacks.
@mofada
Posted
@younes-atyq I think you're right, it's generally better to use visibility
, toggling display
can cause jitter and cause elements to reflow.