@floating-ui/core
1.8.0 · 11 Jul 2026MIT130.1M / weekRepositoryHomepagenpmAtom feed
1.8.0 is the newest release of 1.x.
In short
2 new4 fixed
Release note
New Features
autoPlacement:
crossAxisoptionBy default, aligned placements like
top-start/top-enduse a "fallback" strategy for thecrossAxisto ensure different axes' placements can be chosen, and to keep the preferredalignmentas much as possible.However, if you only have placements along one axis you can now use a "most space" strategy for the alignment as well, e.g.:
autoPlacement({ allowedPlacements: [ 'top-start', 'top-end', 'bottom-start', 'bottom-end' ], crossAxis: true, });detectOverflow: Accept virtual
Rectboundaries
Bug Fixes
size: Consider case where
shift()is in the middleware array beforesize()for center aligned placementsautoPlacement: Prevent resetting placement unexpectedly to opposite alignment when it overflows on all sides
flip: When no placements fit, but before
fallbackStrategyphase, if multiple placements fit on the mainAxis of overflow, choose the placement that fits best on the main crossAxis side of overflowautoPlacement: General algorithm improvements
size: General algorithm improvements