Security News
Internet Archive Hacked, 31 Million Record Compromised
The Internet Archive's "Wayback Machine" has been hacked and defaced, with 31 millions records compromised.
react-sticky-mouse-tooltip
Advanced tools
React tooltip component that follow mouse cursor. You can pass as this tooltip children any HTML element or other React component.
React tooltip component that follow mouse cursor. You can pass as this tooltip children any HTML element or other React component.
npm install react-sticky-mouse-tooltip --save
or
yarn add react-sticky-mouse-tooltip
import React from 'react';
import MouseTooltip from 'react-sticky-mouse-tooltip';
class Preview extends React.Component {
state = {
isMouseTooltipVisible: false,
};
toggleMouseTooltip = () => {
this.setState(prevState => ({ isMouseTooltipVisible: !prevState.isMouseTooltipVisible }));
};
render() {
return (
<div>
<button onClick={this.toggleMouseTooltip} style={buttonStyle}>
Toggle mouse tooltip
</button>
<MouseTooltip
visible={this.state.isMouseTooltipVisible}
offsetX={15}
offsetY={10}
>
<span>Follow the cursor!</span>
</MouseTooltip>
</div>
);
}
}
Attribute | Description | Type | Required | Default value |
---|---|---|---|---|
visible | Visibility of component. | boolean | No | true |
offsetX | Offset along X axis. | number | No | 0 |
offsetY | Offset along Y axis. | number | No | 0 |
className | Tooltip div class name. | string | No | - |
style | Styles properties of tooltip div . | object | No | - |
MIT
FAQs
React tooltip component that follow mouse cursor. You can pass as this tooltip children any HTML element or other React component.
We found that react-sticky-mouse-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
The Internet Archive's "Wayback Machine" has been hacked and defaced, with 31 millions records compromised.
Security News
TC39 is meeting in Tokyo this week and they have approved nearly a dozen proposals to advance to the next stages.
Security News
Our threat research team breaks down two malicious npm packages designed to exploit developer trust, steal your data, and destroy data on your machine.