ycs77 / headlessui-float

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

Apply w-full class to Float div blank rendered #18

Closed mtzrmzia closed 2 years ago

mtzrmzia commented 2 years ago

Use Version

Describe the question I want my ListboxOptions take full width of the parent element, but I cant.

        <Float
            as="div"
            data-testid="float"
            class="w-full"
            placement="bottom"
            :offset="2"
            :shift="2"
            :flip="10"
            :z-index="10"
            tailwindcss-origin-class
        >
          <ListboxButton
              class="relative w-full bg-white">
          </ListboxButton>
          <ListboxOptions
              class="z-10 mt-1 w-full">
            <ListboxOption
                as="template"
                v-slot="{ active, selected }"
            >
              <li class="w-full">
              </li>
            </ListboxOption>
          </ListboxOptions>
        </Float>

image

tung-eh commented 2 years ago

Yeah, the library should provide users the ability to inject style to the floating wrapper element IMO.

ycs77 commented 2 years ago

Hi! Now released v0.9.0 & documentation, can see the Adaptive width section to using.