Overlay
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
Any Paragon component or export may be added to the code example.
Props API#
- children
OverlayProps['children']RequiredSpecifies the content of the
Overlay. - container
OverlayProps['container']A component instance, DOM node, or function that returns either. The overlay will be positioned in relation to the target.
- onEnter
OverlayProps['onEnter']Callback fired before the
Overlaytransitions in. - onEntered
OverlayProps['onEntered']Callback fired after the
Overlayfinishes transitioning in. - onEntering
OverlayProps['onEntering']Callback fired as the
Overlaybegins to transition in. - onExit
OverlayProps['onExit']Callback fired right before the
Overlaytransitions out. - onExited
OverlayProps['onExited']Callback fired after the
Overlayfinishes transitioning out. - onExiting
OverlayProps['onExiting']Callback fired as the Overlay begins to transition out.
- onHide
OverlayProps['onHide']A callback invoked by the overlay when it wishes to be hidden. Required if
rootCloseis specified. - placement
PlacementDefault'top'The placement of the
Overlayin relation to its target. - popperConfig
OverlayProps['popperConfig']Default{}A set of popper options and props passed directly to
Popper. - rootClose
booleanDefaultfalseSpecify whether the overlay should trigger
onHidewhen the user clicks outside the overlay. - rootCloseEvent
OverlayProps['rootCloseEvent']Specify event for triggering a "root close" toggle.
- show
booleanDefaultfalseSet the visibility of the
Overlay. - target
OverlayProps['target']The target element the
Overlayis positioned in relation to. - transition
OverlayProps['transition']DefaultFadeAnimate the entering and exiting of the Overlay.
truewill use the<Fade>transition, or a custom react-transition-group<Transition>component can be provided.
- children
OverlayTriggerProps['children']RequiredSpecifies the content of the
OverlayTrigger. - overlay
OverlayTriggerProps['overlay']RequiredAn element or text to overlay next to the target.
- defaultShow
booleanDefaultfalseThe initial visibility state of the
Overlay. - delay
OverlayTriggerProps['delay']A millisecond delay amount to show and hide the
Overlayonce triggered. - flip
booleanThe initial flip state of the
Overlay. - onHide
OverlayTriggerProps['onHide']Callback fired when the visibility of the overlay changes.
- onToggle
OverlayTriggerProps['onToggle']A 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. - placement
PlacementThe placement of the
Overlayin relation to its target. - popperConfig
OverlayTriggerProps['popperConfig']Default{}A
Popper.jsconfig object passed to the underlying popper instance. - show
booleanThe visibility of the
Overlay.showis a controlled prop so should be paired withonToggleto avoid breaking user interactions. - target
OverlayTriggerProps['target']The target element the
Overlayis positioned in relation to. - trigger
OverlayTriggerType|OverlayTriggerType[]Default['hover', 'focus']Specify which action or actions trigger
Overlayvisibility.
Usage Insights#
OverlayTrigger
| Project Name | Paragon Version | Instance Count | |
|---|---|---|---|
| frontend-app-account | 22.10.0 | 1 | |
| frontend-app-admin-portal | 21.13.1 | 19 | |
| frontend-app-authn | 22.11.2 | 1 | |
| frontend-app-course-authoring | 22.8.1 | 14 | |
| xpert_unit_summary | 22.8.1 | 1 | |
| frontend-app-discussions | 22.7.0 | 19 | |
| frontend-app-gradebook | 22.8.1 | 1 | |
| frontend-app-learner-portal-enterprise | 21.13.1 | 4 | |
| frontend-app-learner-record | 22.10.0 | 2 | |
| frontend-app-learning | 22.10.0 | 8 | |
| frontend-app-library-authoring | 21.11.3 | 2 | |
| frontend-app-ora-grading | 21.11.3 | 2 | |
| frontend-app-publisher | 21.13.1 | 2 | |
| frontend-app-support-tools | 21.13.1 | 4 | |
| frontend-component-header-edx | 21.13.1 | 2 | |
| frontend-component-header | 22.10.0 | 1 | |
| prospectus | 20.46.2 | 6 |