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

reticool

v1.2.1

Published

Chase the cursor with style

Downloads

9

Readme

Reticool Usage

Demo: https://shshaw.github.io/reticool/

Installation

Using a CDN

Minified

<script src="https://unpkg.com/reticool@latest/reticool.min.js"></script>

Uncompiled (for development environments)

<script src="https://unpkg.com/reticool@latest/reticool.js"></script>

Using NPM

npm i reticool
import RETICOOL from 'reticool';

new RETICOOL();

Usage

Just drop this snippet in your JavaScript:

new RETICOOL();

and your stylized cursor will lock on every <a>, <button>, and elements with data-lock attribute.

You may also pass options into reticool.

const config = {
  /** Replace document cursor. Not recommended to set to 'none' */
  cursor: 'crosshair',

  /** Size of your RETICOOL */
  radius: 80,

  /** Border width around your RETICOOL */
  borderWidth: 3,

  /** The default color of your RETICOOL */
  color: '#49D292',

  /** The default opacity of your RETICOOL */
  opacity: 0.85,

  /**
   * Easing of your RETICOOL.
   * The lower the number the slow the RETICOOL will move
   * Recommended to keep this below 0.6 to avoid visual glitches
   */
  ease: 0.2,

  /** Selectors to trigger RETICOOL locking automatically on specific elements */
  lockTriggers: '[data-lock], a, button',

  /** Your RETICOOL color when locked */
  lockColor: '#E8F79A',

  /** Your RETICOOL opacity when locked */
  lockOpacity: 0.99,

  /** A class added to your RETICOOL when locked */
  lockClass: null,

  /** Amount your RETICOOL will travel around the locked point */
  lockTravel: 0.15,

  /**
   * Expand your RETICOOL over the element it locks to.
   * Set to `false` to disable expansion,
   * Set to `0` to fit the element exactly
   * Set to any other number, including negative to expand by that many pixels around the element
   */
  lockExpand: 20,

  /** How fast your RETICOOL changes sizes */
  lockEase: 0.3,

  /**
   * What should appear inside your RETICOOL.
   * You can inject custom HTML for styling, an SVG or IMG, or set it to null for no center
   */
  content: '+',

  /** Use CSS Vars to power your RETICOOL, if supported */
  useCSSVars: true,
};

new RETICOOL(config);

You can rotate through multiple inner cursor content/symbol by hitting any key on the keyboard. To disable this behavior, add a custom content property to the config of your RETICOOL instance.

License

Reticool is released under MIT License