I’m using
:if=
on a component to not display it. However, if I do this it doesn’t take up space. Is there a way to hide it but have it still occupy space?
I’m using
:if=
on a component to not display it. However, if I do this it doesn’t take up space. Is there a way to hide it but have it still occupy space?
:if={false}
means the element will literally not be part of the html, so there is nothing, which could take up space to begin with. For that you’d want to look at CSS level options of hiding the element.
Are you on tailwind? Conditionally add the «invisible» class, it will hide the element but keep it a part of the layout.