Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
$ npm install tooltip --save
var tooltip = require('tooltip')
tooltip()
<h2 data-tooltip="tooltip text">Test the tooltip</h2>
Now hover over h2 and the tooltip will show.
Or, with config:
var tooltip = require('tooltip')
var config = {
showDelay: 100,
style: {
padding: 5
}
}
tooltip(config)
target - defaults to document.documentElement
. Tooltips will be displayed only for elements inside target.
style - styles to be applied to the tooltip element
className - a css class to be applied to the tooltip element. Defaults to "tooltip"
showDelay - defaults to 500
ms
visibleStyle - style to be applied to the tooltip element when it is visible
hiddenStyle - style to be applied to the tooltip element when it is hidden
appendTooltip: Function - a function to append the tooltip (defaults to doing document.body.appendChild(tooltipElement)
)
offset - defaults to { x: 5, y: 5 }
attrName - defaults to "data-tooltip"
. Tooltip will show on hover over elements with this attribute.
Specify data-tooltip-positions="top;bottom;left;right"
to dictate the order of the positions preferred by the tooltip.
FAQs
Tooltip manager
The npm package tooltip receives a total of 2,909 weekly downloads. As such, tooltip popularity was classified as popular.
We found that 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.