2.0.2 • Published 7 years ago

hide-mouse v2.0.2

Weekly downloads
1
License
GNU GENERAL PUBLI...
Repository
github
Last release
7 years ago

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.

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.0.0

8 years ago