
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
@seracio/tooltip
Advanced tools
useTooltip is a React hook to easily create tooltip in your React components.
@seracio/tooltip has 2 peer dependencies that need to be installed first
npm i react d3-selection
npm i @seracio/tooltip
You need to be aware of several things:
data-tooltip attributeimport { useState } from "react";
import { useTooltip, useTooltipArea } from "@seracio/tooltip";
const MyComponent = () => {
const [targetIndex, set] = useState(-1);
const [Tooltip, root] = useTooltip({
enterCb: (el) => set(+el.getAttribute("data-tooltip-index")),
leaveCb: (el) => set(-1),
});
const size = 500;
const data = [
{
x: 0,
y: 0,
width: 100,
height: 100,
},
{
x: 300,
y: 200,
width: 50,
height: 80,
},
];
return (
<div
style={{
position: "relative",
width: "100%",
maxWidth: "600px",
margin: "auto",
}}
ref={root}
>
<Tooltip />
<svg preserveAspectRatio="xMidYMid meet" viewBox={`0 0 ${size} ${size}`}>
{data.map((d, i) => {
return (
<rect
style={{ cursor: "pointer" }}
key={i}
data-tooltip={`rect number ${i + 1}`}
data-tooltip-index={i}
{...d}
fill={targetIndex === i ? "red" : "blue"}
/>
);
})}
</svg>
</div>
);
};
<MyComponent />;
// TODO
FAQs
A React hook to make tooltips
The npm package @seracio/tooltip receives a total of 2 weekly downloads. As such, @seracio/tooltip popularity was classified as not popular.
We found that @seracio/tooltip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.