npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@rm-labo/mouse-stalker

v1.0.3

Published

Mouse stalker with simple round design.

Downloads

3

Readme

mouse-stalker

badge badge

| Statements | Branches | Functions | Lines | | --------------------------- | ----------------------- | ------------------------- | ----------------- | | Statements | Branches | Functions | Lines |

This library is intended for pointing devices only. It does not affect any display on touch devices.

Demo

demo page is here

Install

$ npm i @rm-labo/mouse-stalker

Usage

import MouseStalker from '@rm-labo/mouse-stalker'

const opt = {
  // ... options ...
}

MouseStalker.init(opt)

Default options

{
  mouseElementClassName: 'mouse-stalker-root',
  pointerElementClassName: 'mouse-stalker-pointer',
  iconTargetElementClassName: 'mouse-stalker-icon-target',
  pageBaseColor: '#ffffff',
  pointerColor: 'rgba(0,0,0,1)',
  pointerSize: 24,
  zIndex: '9999',
  hoveringExpansionRatio: 2,
  hoveringBorderWidth: 1,
  scoped: false,
  targetSelectorsDataName: 'data-st-target',
  hoveringIconName: 'data-st-icon-name',
  hoveringIconAnimationName: 'data-st-icon-animation-name',
}

hover effects

About designation of Effects.

| Name of data attribute | | | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | data-st-target | If the mouse cursor hovers over an element with this attribute, the MouseStalker is increased by the ratio of hoveringExpansionRatio. | | data-st-icon-name | By specifying the name of the iconify.design, the mouse cursor can display the icon. | | data-st-icon-animation-name | Specifies how the icon is to be displayed. |

<!-- hover effects example -->
<button data-st-target>Default</button>
<button data-st-target data-st-icon-name="bxs:cat">Cat</button>
<button data-st-target data-st-icon-name="akar-icons:heart">Heart</button>
<button data-st-target data-st-icon-name="ri:zoom-in-line">Zoom In</button>
<button data-st-target data-st-icon-name="fa-solid:arrow-left" data-st-icon-animation-name="toLeft">Left Arrow</button>
<button data-st-target data-st-icon-name="fa-solid:arrow-up" data-st-icon-animation-name="toTop">Up Arrow</button>
<button data-st-target data-st-icon-name="fa-solid:arrow-down" data-st-icon-animation-name="toBottom">Down Arrow</button>
<button data-st-target data-st-icon-name="fa-solid:arrow-right" data-st-icon-animation-name="toRight">Right Arrow</button>

Methods

| Method | | | ------------------------ | -------------------------- | | MouseStalker.init(opt) | Show MouseStalker | | MouseStalker.destroy() | Remove MouseStalker | | MouseStalker.update(opt) | Update MouseStalker with opt |

Options

| Option | Type | Default | | -------------------------- | --------- | ---------------------------------------- | | mouseElementClassName | string | mouse-stalker-root | | pointerElementClassName | string | mouse-stalker-pointer | | iconTargetElementClassName | string | mouse-stalker-icon-target | | pageBaseColor | string | #ffffff | | pointerColor | string | rgba(0,0,0,1) | | pointerSize | number | 24 | | zIndex | string | 9999 | | hoveringExpansionRatio | number | 2 | | hoveringBorderWidth | number | 1 | | scoped | boolean | false | | targetSelectorsDataName | string | data-st-target | | hoveringIconName | string | data-st-icon-name | | hoveringIconAnimationName | string | data-st-icon-animation-name (This attribute accepts are toTop, toBottom, toRight, and toLeft) |

Notes on background color

The mix-blend-mode is used to draw the mouse pointer. Therefore, background-color must be specified in the body tag.

body {
  background-color: white; /* must be specified */
}

Note that Option.pageBaseColor is output for this background color.

Licence

Licensed under MIT license. You are free to use for your personal or commercial projects. However, this program is based on iconify.design and has been extended. Please refer to iconify.design for the license of each icon used internally.

Release notes

| Version | Description | | ------- | ----------- | | 1.0.0 | Launch |