Popovers are lightweight overlays meant to provide additional information and/or context to a specific element similar to Tooltip components. Unlike tooltips, however, popovers must be manually invoked. Unlike MessageBox and Modal components, popovers are not intended to prevent the user’s interaction with the application.
Examples
Placement
Placement defines the position of popovers relative to the elements to which they are tied. Four base placements are supported: 'top', 'bottom', 'left', and 'right' (default). Each of the base placements can have an optional modifier that positions the pointer toward an edge of the popover. The modifiers are -start and -end and they can be appended to any of the base placements (e.g.top-start, left-end, etc.) The absense of a modifier will center the pointer along the edge it’s placed on. Use the placement property to set the placement.
Use the width property to specify a custom width for the popover. When a custom width is used, the popover receives a maximum height and content within the popover will scroll, if necessary.
React component to which the popover will be attached.
message
Node
Required
Collection of React components to be placed in popover’s content area.
textClose
String
Required
Localized assistive text for the close button.
title
String
Required
Popover heading text.
className
String
Custom classes for the popover wrapper.
disableHideWhenTargetIsHidden
Boolean
Disable hiding the popover when the target element is scrolled past or otherwise hidden.
flipContainer
Element or Element[]
Used to create a boundary for the underlying Popper to stay within.
id
String
Random value
Used to build id attributes for accessibility reasons.
placement
String or String[]
['right', 'left', 'top', 'bottom']
Placement of the popover relative to the target element. Options are 'auto', 'auto-start', 'auto-end', 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'left', 'left-start', 'left-end', 'right', 'right-start', 'right-end'. If you use an array of strings, the first item in the array is the default placement and the following ones are chosen in order as fallback placements if the preceding ones don’t work.
show
Boolean
false
Controls whether the popover is visible.
width
String
The custom width of the popover. The value must specify the units as well as the value (e.g.200px, 40vw or 30%). When a custom width is used, the popover receives a maximum height and content within the popover will scroll, if necessary.
Callbacks
Property
Parameters
Description
onCloseClicked
event
Callback function fired when the close button is clicked. If this is not passed, an attempt will be made to fire the onHide function instead.
onHide
Callback function fired when the popover is hidden (typically with a click outside of the popover).