Socket
Socket
Sign inDemoInstall

@defaude/autohide-cursor

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@defaude/autohide-cursor

Tiny no-dependency library that will automatically hide the cursor after a given time of mouse inactivity.


Version published
Maintainers
1
Created
Source

autohide-cursor

Tiny no-dependency library that will automatically hide the cursor after a given time of mouse inactivity. No build tools, no bundlers, nothing.

Direct usage

The easiest way to get this is to import the index.js module - this will load the autohideCursor function and start it with the default delay of 1 second:

<script type="module" src="https://unpkg.com/@defaude/autohide-cursor/index.js"></script>

When you want to control the delay (or when/how the function is called), import the function directly:

<script type="module">
    import {autohideCursor} from "https://unpkg.com/@defaude/autohide-cursor";
    autohideCursor(1234);
</script>

Installation as npm package

This is published as npm package, so you can just

npm install @defaude/autohide-cursor

and use it in your code

import { autohideCursor } from '@defaude/autohide-cursor';

// ... and whenever you want start hiding the cursor
autohideCursor(); // or pass the delay explicitly

FAQs

Package last updated on 12 May 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc