@cthacker/overlaytriggerinject
v2.2.1
Published
Wrapper of react-bootstrap's OverlayTrigger component
Downloads
9
Maintainers
Readme
React-Bootstrap OverlayTrigger Wrapper.
Benefits:
- Less boilerplate code
- More customization options
- Display while hovering over tooltip customization
- Override props without providing boilerplate function
- Compatible with NextJS 13+
Specifications
- Language
- Typescript
- Framework
- React >18+
Props Descriptions
delay
OverlayDelay:{ hide: number, show: number }
- The applied
react-bootstrap
property for the OverlayTrigger component{{ hide: <ms>, show: <ms> }}
- The applied
displayWhileHover
boolean- Custom prop, allows for the tooltip to stay visible while the user is hovering over it, and then disappears when the tooltip loses focus.
onToggle
(_nextShow: boolean) => void
inherited from react-bootstrap's OverlayTrigger onToggle callback specification_nextShow
: The next boolean value that will be applied to the state of the component_nextShow = true -->
the component is "showing"
placement
Placement: AutoPlacement | BasePlacement | VariantPlacement inherited from react-bootstrap's OverlayTrigger Placement type specification, basically an string enum- Controls the placement of the tooltip relative to it's wrapped children
show
boolean- The most important value, controls whether the Tooltip is shown or not on the screen, or inserted into the DOM.
- show = true --> tooltip is showing
- show = false --> tooltip is not showing
- The most important value, controls whether the Tooltip is shown or not on the screen, or inserted into the DOM.
title
string | ReactNode- The contents of the tooltip, fully customizable, can either be a raw string, or a complex ReactNode component
trigger
OverlayTriggerType | OverlayTriggerType[] inherited from react-bootstrap's OverlayTrigger specifications