ycs77 / headlessui-float

Easily use Headless UI with Floating UI to position floating elements.
https://headlessui-float.vercel.app
MIT License
344 stars 12 forks source link

What is correct way to set popper width same as reference #9

Closed Intaria closed 2 years ago

Intaria commented 2 years ago

Hello. First of all - great package!

Could you plz answer, is it possible to set popper width same as reference?

ycs77 commented 2 years ago

You can set the same width class on two elements:

<Float>
  <Menu.Button className="w-48 ...">
    Button
  </Menu.Button>

  <Menu.Items className="w-48 ...">
    ...
  </Menu.Items>
</Float>