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
nodeRequiredSpecifies the content of the
Overlay.container
elementType|funcA component instance, DOM node, or function that returns either. The overlay will be positioned in relation to the target.
onEnter
funcCallback fired before the
Overlaytransitions in.onEntered
funcCallback fired after the
Overlayfinishes transitioning in.onEntering
funcCallback fired as the
Overlaybegins to transition in.onExit
funcCallback fired right before the
Overlaytransitions outonExited
funcCallback fired after the
Overlayfinishes transitioning out.onExiting
funcCallback fired as the Overlay begins to transition out.
onHide
funcA callback invoked by the overlay when it wishes to be hidden. Required if
rootCloseis specified.placement
enum'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
Overlayin relation to it's target.popperConfig
objectDefault{}A set of popper options and props passed directly to
Popper.rootClose
boolDefaultfalseSpecify whether the overlay should trigger
onHidewhen the user clicks outside the overlay.rootCloseEvent
enum'click' | 'mousedown'Specify event for triggering a “root close” toggle.
show
boolDefaultfalseSet the visibility of the
Overlay.target
elementType|funcThe visibility of the
Overlay.showis a controlled prop so should be paired withonToggleto avoid breaking user interactions.Manually toggling show does not wait for delay to change the visibility.
Controls
onToggle.transition
funcDefaultFadeAnimate the entering and exiting of the Overlay.
truewill use the<Fade>transition, or a custom react-transition-group<Transition>component can be provided.
children
element|funcRequiredSpecifies the content of the
OverlayTrigger.overlay
element|funcRequiredAn element or text to overlay next to the target.
defaultShow
boolDefaultfalseThe initial visibility state of the
Overlay.delay
number|objectA millisecond delay amount to show and hide the
Overlayonce triggered.flip
boolThe initial flip state of the
Overlay.onHide
nullonToggle
funcA callback that fires when the user triggers a change in tooltip visibility.
onToggleis called with the desired next show, and generally should be passed back to theshowprop.onTogglefires after the configureddelay.Controls
show.placement
enum'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
Overlayin relation to it's target.popperConfig
objectDefault{}A
Popper.jsconfig object passed to the the underlying popper instance.show
boolThe visibility of the
Overlay.showis a controlled prop so should be paired withonToggleto avoid breaking user interactions.Manually toggling show does not wait for delay to change the visibility.
Controls
onToggle.target
nulltrigger
triggerType|triggerType[]Default['hover', 'focus']Specify which action or actions trigger
Overlayvisibility.