#TailwindUI Components slightly broken

11 messages · Page 1 of 1 (latest)

elfin sparrow
#

When I try to use TailwindUI prebuilt pages by simply pasting the HTML into an astro component, then the website looks as expected on lg-screen devices, but on mobiles the nav bar is bricked and always shows. The close button does not work.
Is this a previously known issue?

#

This is what it looks like

wheat rapids
#

Does the tailwindui component have any script tag?

elfin sparrow
#

There are no script tags anywhere in the project

wheat rapids
#

The navbar uses checkbox?

elfin sparrow
#

Hmm it seems that it might be that the HTML-only navbar is not fully functional

wheat rapids
#

What is supposed to toggle the navbar visibility?

#

HTML-only navbar
In that case, no checkbox, no interactivity

elfin sparrow
#

yeah thats what I found

#

Is headlessui even supported in astro?

#

It seems that for example for simple Components like Popovers, when using the following code

<Popover className="relative">
      <Popover.Button>Solutions</Popover.Button>

      <Popover.Panel className="absolute z-10">
        <div className="grid grid-cols-2">
          <a href="/analytics">Analytics</a>
          <a href="/engagement">Engagement</a>
          <a href="/security">Security</a>
          <a href="/integrations">Integrations</a>
        </div>

        <img src="/solutions.jpg" alt="" />
      </Popover.Panel>
    </Popover>```

it will just error out because `<Popover.Button /> is missing a parent <Popover /> component.
`