![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
react-super-tooltip
Advanced tools
[![Version](http://img.shields.io/npm/v/react-super-tooltip.svg)](https://www.npmjs.org/package/react-super-tooltip)
Spott.ai - interactive videos and images
react-super-tooltip
is made to be super simple to use, but still be very smart out of the box with default
configuration. It can automatically position itself to be in the viewport by calculating the best position
relative to your element (top, right, bottom, left or any 4 corners), and even when it finds perfect location
it will additionally offset itself to find even better fit.
npm i react-super-tooltip
1 . Import react-super-tooltip in your code
import ReactSuperTooltip from 'react-super-tooltip'
2 . Wrap your element in <ReactSuperTooltip>
component
<ReactSuperTooltip>
<button>Hover me</button>
</ReactSuperTooltip>
3 . That's it
<ReactSuperTooltip />
can have its own props which will override default behavior for that specific tooltip, for example <ReactSuperTooltip trigger="click" />
Name | Type | Default | Description |
---|---|---|---|
content | Node | Tooltip content | |
trigger | String | hover | How to trigger tooltip (Available: hover, click) |
ignoreTrigger | Bool | false | Tooltip can be opened only manually (by calling tooltipRef.show()), trigger is ignored |
preferredPosition | String | right | Define your preferred position that will be used if multiple positions are possible |
interactive | Bool | true | Allow mouse events on the tooltip and keep it open when hovered |
component | Component | div | Choose container element |
arrowSize | Number | 6 | Tooltip arrow size |
arrowColor | String | #fff | Tooltip arrow color |
offset | Number | 0 | Number of pixels to offset tooltip away from the element |
bounds | String | Selector or HTML element to be used as boundaries | |
keepInBounds | Bool | false | Keep the tooltip inside the boundaries even if it covers the target element |
onShow | Function | noop | Callback function that will be called when tooltip is shown |
onHide | Function | noop | Callback function that will be called when tooltip is hidden |
Show the tooltip manually, for example:
import ReactSuperTooltip from 'react-super-tooltip';
<ReactSuperTooltip ref={ref => this.tooltipRef = ref}>
<button>I'm a button</button>
</ReactSuperTooltip>
<button onClick={() => { this.tooltipRef.show() }}>Show tooltip</button>
Hide the tooltip manually
import ReactSuperTooltip from 'react-super-tooltip';
<ReactSuperTooltip ref={ref => this.tooltipRef = ref}>
<button>I'm a button</button>
</ReactSuperTooltip>
<button onClick={() => { this.tooltipRef.hide() }}>Hide tooltip</button>
MIT
FAQs
[![Version](http://img.shields.io/npm/v/react-super-tooltip.svg)](https://www.npmjs.org/package/react-super-tooltip)
The npm package react-super-tooltip receives a total of 0 weekly downloads. As such, react-super-tooltip popularity was classified as not popular.
We found that react-super-tooltip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.