usePopover API

API reference docs for theusePopovercomponent. For examples and details on the usage of this component, visit the component demo page.

Props

PropsTypeDescriptionDefault
isOpen?booleanWhen true, the popover element is open. Required when using the isPopoverAlwaysMounted option._
isPopoverAlwaysMounted?booleanSet this value to true when the popover remains mounted but is visually hidden with CSS when the popover is closed.false
matchReferenceWidth?booleanWhen true, the popover element will match the width of the reference element._
maxHeight?numberThe maximum height of the popover, by default Popover comes with overflow hidden, make sure you have scrollable styles when content overflows from maxHeight._
maxWidth?numberThe maximum width of the popover, by default Popover tries to take remaining space of relative parent width, when you restrict content width ensure you are also wrapping content with ellipses._
offset?numberDistance between the reference element and popover element in pixels._
placement?'top' | 'right' | 'bottom' | 'left' | 'top-start' | 'top-end' | 'right-start' | 'right-end' | 'bottom-start' | 'bottom-end' | 'left-start' | 'left-end'Placement of the popover relative to the reference.bottom-start
strategy?'fixed' | 'absolute'The strategy used to position the floating element.absolute