Thanks for the clarification! You're absolutely right — if you're relying on Tailwind's hidden
class for toggling visibility, then should directly add or remove that class instead of using x-show
, which only toggles visibility via inline styles (not classes). Let's fix that using Alpine's :class
binding.