There are cases where CSS relative does not properly synchronize the width of the floating element, such as when using the portal at the same time. At this point, you can use the adaptiveWidth prop, which uses the ResizeObserver API to monitor the width of the reference element and synchronize it to the floating element, but the performance will be worse than the CSS implementation.
Fixed #24
There are cases where CSS
relative
does not properly synchronize the width of the floating element, such as when using theportal
at the same time. At this point, you can use theadaptiveWidth
prop, which uses theResizeObserver
API to monitor the width of the reference element and synchronize it to the floating element, but the performance will be worse than the CSS implementation.Usage (React)
Usage (Vue)