Overlays
A set of components for positioning beautiful overlays, tooltips, popovers, and anything else you need.
This component is used to power Tooltips and Popovers.
This is a pass through component from React-Bootstrap.
See React-Bootstrap for additional documentation.
Basic usage
- children
node
Required RequiredSpecifies the content of the
Overlay
. - container
elementType
Required |func
Required RequiredA component instance, DOM node, or function that returns either. The overlay will be positioned in relation to the target.
- onEnter
func
RequiredCallback fired before the
Overlay
transitions in. - onEntered
func
RequiredCallback fired after the
Overlay
finishes transitioning in. - onEntering
func
RequiredCallback fired as the
Overlay
begins to transition in. - onExit
func
RequiredCallback fired right before the
Overlay
transitions out - onExited
func
RequiredCallback fired after the
Overlay
finishes transitioning out. - onExiting
func
RequiredCallback fired as the Overlay begins to transition out.
- onHide
func
RequiredA callback invoked by the overlay when it wishes to be hidden. Required if
rootClose
is specified. - placement
enum
Required'auto-start' | 'auto' | 'auto-end' | 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start'Default'top'The placement of the
Overlay
in relation to it's target. - popperConfig
shape
Required {}Default{}A set of popper options and props passed directly to
Popper
. - rootClose
bool
RequiredDefaultfalseSpecify whether the overlay should trigger
onHide
when the user clicks outside the overlay. - rootCloseEvent
enum
Required'click' | 'mousedown'Specify event for triggering a “root close” toggle.
- show
bool
RequiredDefaultfalseSet the visibility of the
Overlay
. - target
elementType
Required |func
Required RequiredThe visibility of the
Overlay
.show
is a controlled prop so should be paired withonToggle
to avoid breaking user interactions.Manually toggling show does not wait for delay to change the visibility.
Controls
onToggle
. - transition
func
RequiredDefaultFadeAnimate the entering and exiting of the Overlay.
true
will use the<Fade>
transition, or a custom react-transition-group<Transition>
component can be provided.
- children
element
Required |func
Required Required RequiredSpecifies the content of the
OverlayTrigger
. - overlay
element
Required |func
Required Required RequiredAn element or text to overlay next to the target.
- defaultShow
bool
RequiredDefaultfalseThe initial visibility state of the
Overlay
. - delay
number
Required |shape
Required {} RequiredA millisecond delay amount to show and hide the
Overlay
once triggered. - flip
bool
RequiredThe initial flip state of the
Overlay
. - onHide
null
Required - onToggle
func
RequiredA callback that fires when the user triggers a change in tooltip visibility.
onToggle
is called with the desired next show, and generally should be passed back to theshow
prop.onToggle
fires after the configureddelay
.Controls
show
. - placement
enum
Required'auto-start' | 'auto' | 'auto-end' | 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-end' | 'bottom' | 'bottom-start' | 'left-end' | 'left' | 'left-start'The placement of the
Overlay
in relation to it's target. - popperConfig
shape
Required {}Default{}A
Popper.js
config object passed to the the underlying popper instance. - show
bool
RequiredThe visibility of the
Overlay
.show
is a controlled prop so should be paired withonToggle
to avoid breaking user interactions.Manually toggling show does not wait for delay to change the visibility.
Controls
onToggle
. - target
null
Required - trigger
triggerType
Required |triggerType
Required[]
Required RequiredDefault['hover', 'focus']Specify which action or actions trigger
Overlay
visibility.