Socket
Socket
Sign inDemoInstall

hide-mouse

Package Overview
Dependencies
2
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    hide-mouse

Hides the cursor after a specific time without movement


Version published
Maintainers
1
Install size
8.77 MB
Created

Readme

Source

hide-mouse

Hides the mouse cursor after a specific time.

Install

npm install hide-mouse

Usage

To hide the cursor pass the desired DOM-element as el property and define the timeout as the hideAfter property in ms.

import hideMouse from 'hide-mouse';

const el = document.getElementById('hide-area');
const hm = hideMouse({ el, hideAfter: 2000 });

It is also possible to temporarily deactiave the behavior by using the deactivate method.

hm.deactivate();
// ...
hm.activate();

To completely unsubscribe and turn off the service use the kill method.

hm.kill();

Example

To start the example run npm run example and visit http://localhost:1234

Build

To generate a new build run npm run build, which will fail if tests won't pass. You can manually run the tests by using npm test.

Keywords

FAQs

Last updated on 16 May 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc