The custom element or virtual element that will be set as the reference
to position the floating element.
If provided, it will replace the default anchor element.
side?: "top" | "right" | "bottom" | "left"
The preferred side of the trigger to render against when open.
Will be reversed when collisions occur and avoidCollisions
is enabled. Defaults to "bottom".
sideOffset?: number
The distance in pixels from the trigger. Defaults to 0.
sideFlip?: boolean
Flip to the opposite side when colliding with boundary. Defaults to true.
align?: "start" | "center" | "end"
The preferred alignment against the trigger.
May change when collisions occur. Defaults to "center".
alignOffset?: number
An offset in pixels from the start or end alignment options. Defaults to 0.
alignFlip?: boolean
Flip alignment when colliding with boundary.
May only occur when prioritizePosition is true. Defaults to true.
avoidCollisions?: boolean
When true, overrides the side and align preferences
to prevent collisions with boundary edges. Defaults to true.
collisionBoundary?: Element | (Element | null)[] | null
The element used as the collision boundary. By default
this is the viewport, though you can provide additional
element(s) to be included in this check. Defaults to [].
The distance in pixels from the boundary edges where collision
detection should occur. Accepts a number (same for all sides),
or a partial padding object, for example: { top: 20, left: 20 }. Defaults to 0.
arrowPadding?: number
The padding between the arrow and the edges of the content.
If your content has border-radius, this will prevent it from
overflowing the corners. Defaults to 0.
hideShiftedArrow?: boolean
When true, hides the arrow when it cannot be centered
to the reference element. Defaults to true.
sticky?: "partial" | "always"
The sticky behavior on the align axis. partial will keep the
content in the boundary as long as the trigger is at least partially
in the boundary whilst "always" will keep the content in the boundary
regardless. Defaults to "partial".
hideWhenDetached?: boolean
Whether to hide the content when the trigger becomes fully occluded. Defaults to false.
positionStrategy?: "absolute" | "fixed"
The type of CSS position property to use.
updatePositionStrategy?: "always" | "optimized"
Strategy to update the position of the floating element on every animation frame. Defaults to 'optimized'.
disableUpdateOnLayoutShift?: boolean
Whether to disable the update position for the content when the layout shifted. Defaults to false.
prioritizePosition?: boolean
Force content to be position within the viewport.
Might overlap the reference element, which may not be desired. Defaults to false.
disableOutsidePointerEvents?: boolean
When true, hover/focus/click interactions will be disabled on elements outside
the DismissableLayer. Users will need to click twice on outside elements to
interact with them: once to close the DismissableLayer, and again to trigger the element.
When false, the popover will not close when clicking outside or pressing escape.
defaultOpen
boolean
The open state of the popover when it is initially rendered. Use when you do not need to control its open state.
open
boolean
The controlled open state of the popover.
modal
false
boolean
The modality of the popover. When set to true, interaction with outside elements will be disabled and only popover content will be visible to screen readers.
openDelay
0
number
The duration from when the mouse enters the trigger until the hover card opens.
closeDelay
0
number
The duration from when the mouse leaves the trigger or content until the hover card closes.