A JavaScript library to position floating elements and create interactions for them.
MIT License
Bot releases are visible (Hide)
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
padding
is specified, the coordinates of the floating element are now adjusted if needed to ensure the arrow continues to point at the center of the reference element. This takes precedence over start
and end
alignments. (#1496)Published by github-actions[bot] over 2 years ago
openOnArrowKeyDown
and disabledIndices
props (#1690)fix(useHover): avoid setTimeout
wrapper if delay
is an object but the individual value is set to 0
(#1638)
fix(FloatingOverlay): only use position: fixed
technique on iOS and account for visual viewport offsets during pinch-zoom (#1693)
fix(useHover): close on scroll mouseleave
when using safePolygon
(#1694)
fix(useListNavigation): focusItemOnOpen
logic (#1638)
fix(safePolygon): handle floating point errors (#1694)
fix(useListNavigation): off-by-one error when activeIndex
is not initially set and allowEscape: false
(#1638)
fix(useListNavigation): use mouse
not pointer
events for hover focus sync to prevent unwanted sync while scrolling on touch devices (#1638)
fix(FloatingFocusManager): prevent trapping focus if reference
is specified in order
and modal: false
(#1638)
fix(useFocus): open
not changing if the window blurred and the reference element is the first element in the tab order (#1638)
fix(useClick): keyboard Enter
click requiring two presses after using pointerDown
in certain situations (#1638)
Published by github-actions[bot] over 2 years ago
@floating-ui/core
v0.7.0 changes package entry points. (#1678)
@floating-ui/core
v0.7.0 has breaking changes. (#1674)
fix: getDimensions
platform method (#1685)
Arrows now work correctly in React Native
Published by github-actions[bot] over 2 years ago
Add useFloatingPortalNode
hook for better interop with other portals in other libraries (#1672)
Introduce a new whileElementsMounted
callback prop to simplify usage of autoUpdate
. (#1683)
@floating-ui/core
v0.7.0 has breaking changes. (#1674)
Replaced .cjs
file with .mjs
and removed module
type from package. Fixes CJS support in create-react-app
. (#1678)
useHover
safePolygon
when using a narrow reference type (#1665)Published by github-actions[bot] over 2 years ago
whileElementsMounted
callback prop to simplify usage of autoUpdate
. (#1683)@floating-ui/core
v0.7.0 has breaking changes. (#1674)
Replaced .cjs
file with .mjs
and removed module
type from package. Fixes CJS support in create-react-app
. (#1678)
Published by github-actions[bot] over 2 years ago
Added "browser" export conditions (#1666)
BREAKING: removed the previous "production" and "development" export conditions. The new "browser" key is a replacement for this. See Package entry points.
@floating-ui/core
v0.7.0 has breaking changes. (#1674)
Replaced .cjs
file with .mjs
and removed module
type from package. Fixes CJS support in create-react-app
. (#1678)
Avoid navigator
audit message in Chrome DevTools (#1663)
fix(autoUpdate): retain floating element's ResizeObserver
when elementResize: true
and animationFrame: true
(#1673)
Published by github-actions[bot] over 2 years ago
Added "browser" export conditions (#1666)
BREAKING: removed the previous "production" and "development" export conditions. The new "browser" key is a replacement for this. See Package entry points.
The size
apply callback and offset
callback signatures have changed to be more ergonomic, especially in React. (#1674)
BREAKING: The parameters width
and height
passed into size()
middleware apply
function are now named availableWidth
and availableHeight
, which better represents what the values are.
Replaced .cjs
file with .mjs
and removed module
type from package. Fixes CJS support in create-react-app
. (#1678)
BREAKING: In both the size()
and offset()
middleware, the reference
and floating
top-level parameters are now namespaced under rects
— rects.reference
and rects.floating
. (#1674)
The entire MiddlewareArguments
object gets spread in, so there's more data to access if needed.
fix(arrow): fallback to the floating
element as the offsetParent
(#1685)
React Native / other platforms that do not implement getOffsetParent
Published by github-actions[bot] over 2 years ago
feat(useClick): add keyboard handlers for non-button elements used as the reference element (#1652)
feat(useClick): add ignoreMouse
prop (#1652)
Delete useFocusTrap
(#1654)
Improve hover and focus sync logic (#1646)
Fix shadow DOM support (#1650)
Checks for the activeElement
inside shadow roots and detecting pointerdown events inside shadow roots. Fixes floating elements nested inside shadow doms being wrongly closed when a pointerdown occurs inside the floating element.
Published by github-actions[bot] over 2 years ago
fix(FloatingDelayGroup): use 1ms open delay (#1635)
fix(FloatingFocusManager): import React (#1634)
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
feat(useListNavigation): allowEscape
prop (#1631)
New <FloatingFocusManager />
component (#1628)
DEPRECATED: useFocusTrap
is no longer recommended. Use this component instead.
feat(useClick): toggle
prop (#1633)
fix(useTypeahead): improve dataRef typing detection (#1627)
fix(useListNavigation): allow nullish items (#1630)
Supports list virtualization
fix(useTypeahead): use .toLocaleLowerCase()
(#1632)
Include LICENSE file in npm package (#1626)
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
fix(types): export AutoUpdateOptions (#1623)
Prevent crash in browsers without ShadowRoot
support (#1621)
Include LICENSE file in npm package (#1626)
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
restMs
+ buffer
options (#1620)Allow undefined
passed as an event listener prop value in prop getters (#1614)
getFloatingProps({onKeyDown: undefined})
Do not close floating element on blur when focus goes to nested floating elements within a portal (#1619)
fix(restMs): handleClose in a deep tree (#1616)
fix(useListNavigation): reset index in pointer leave (#1617)
Simplify useInteractions
prop merging logic (#1614)
fix(restMs): allow infinite delay (#1616)
If restMs
is specified, and delay
is 0
(the default), then delay
is infinite (i.e. a no-op)
feat(types): allow specifying narrower reference type in useFloating()
(#1615)
Published by github-actions[bot] over 2 years ago
Fix single frame positioning glitches in React 18 (due to batched updates) (#1613)
feat(types): allow specifying narrower reference type in useFloating()
(#1615)
Published by github-actions[bot] over 2 years ago
Published by github-actions[bot] over 2 years ago
useClick
pointerDown
option (#1609)
For faster feedback, if wanted
useDismiss
bubbles
option (#1609)
Determines if dismissals bubble through an entire FloatingTree
or not
useListNavigation
now handles pointer listeners automatically, navigation focus is synchronised on hover (#1609)
getItemProps
is now returned from useInteractions()
to enable this, plus, a focusItemOnHover
option to disable if wanted
Fix selectedIndex
when not null
from stealing page focus on mount (#1609)
Nested FloatingOverlays
(e.g. modals) and scroll locks are now correctly handled (#1609)
Removed limitation where modal: true
in useFocusTrap
required a Portal (#1609)
Reduce re-renders (#1609)