#TextInput Layout Shift on Error

2 messages · Page 1 of 1 (latest)

minor helm
#

Hello,
I am implementing a form that uses Mantine's TextInput component. The layout shifts when an error message is displayed below the TextInput component. This seems to be the intended library behaviour per this discussion - https://github.com/orgs/mantinedev/discussions/6658.

I want to avoid the layout shift for my project; what would be the correct way to achieve this? The above discussion mentioned absolute positioning the error message, but that results in a fair share of issues when you account for description, long error messages which overflow, elements below the input, etc.

#

For more context - I am creating wrapper components over TextInput and intend to update the wrapper, so all instances of the wrapper feed into the updated behaviour.