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 🙏

© 2026 – Pkg Stats / Ryan Hefner

eye-on-it

v1.0.6

Published

A JavaScript library for tracking mouse movement and input focus.

Downloads

14

Readme

eye-on-it

Watch the position of the last letter entered in the mouse or input window.

Installation

Install from NPM

We can install Swiper from NPM

$ npm install eye-on-it

When you use React

// import eye-on-it JS
import { initEyeOnIt } from "eye-on-it";
// import eye-on-it styles
import "eye-on-it/style.css";

const App = () => {
  useEffect(() => {
    initEyeOnIt();
  }, []);
};

Use eye-on-it from CDN

<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/eye-on-it/dist/style.css"
/>
<script src="https://cdn.jsdelivr.net/npm/eye-on-it/dist/index.min.js"></script>

If you use ES module in the browser, there is a CDN version for that too,

<script type="module">
  import { initEyeOnIt } from "https://cdn.jsdelivr.net/npm/eye-on-it/dist/index.mjs";

  initEyeOnIt();
</script>

Download assets

If you want to use eye-on-it assets locally, you can directly download them from https://www.jsdelivr.com/package/npm/eye-on-it

Add eye-on-it HTML Layout

Now, we need to add a basic eye-on-it layout to our app,

<!-- The area that is followed by the mouse -->
<div class="eye-container">
  <!-- Parental area where eye-point moves -->
  <div>
    <!-- an element that follows -->
    <div class="eye-point">eye</div>
  </div>

  <!-- Eye-points look at the input -->
  <input class="eye-input" />
  <!-- The textarea the eye-points look at -->
  <textarea class="eye-textarea"></textarea>
</div>

Example

But if I do this, I think it'll look weird and I don't understand. So I prepared an example code.

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Eye On It Example</title>
    <link
      rel="stylesheet"
      href="https://cdn.jsdelivr.net/npm/eye-on-it/dist/style.css"
    />
    <script src="https://cdn.jsdelivr.net/npm/eye-on-it/dist/index.min.js"></script>
    <link rel="stylesheet" href="style.css" />
  </head>
  <body class="eye-container">
    <div>
      <div class="face">
        <div><div class="eye eye-point"></div></div>
        <div><div class="eye eye-point"></div></div>
      </div>

      <div class="input-wrapper">
        <input class="input eye-input" type="text" />
        <textarea class="textarea eye-textarea"></textarea>
      </div>
    </div>
    <textarea class="textarea long eye-textarea"></textarea>
  </body>
</html>
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  width: 100%;
  height: 100vh;
  background-color: #fafafa;
  display: flex;
  justify-content: center;
  align-items: center;
  > div {
    margin-right: 40px;
  }
}

.face {
  margin: 0 auto;
  width: fit-content;
  display: flex;
  > div {
    width: 20px;
    height: 30px;
    border: 1px solid black;
    & + div {
      margin-left: 10px;
    }
  }
}

.eye {
  width: 8px;
  height: 12px;
  background-color: black;
}

.input-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.input,
.textarea {
  width: 20vw;
  min-width: 300px;
  height: 24px;
  margin-top: 20px;
}
.textarea {
  height: 50px;
}
.textarea.long {
  height: 300px;
}

한국인을 위해 간단히 한글로 적어봅니다.

  • eye-point : 특정한 위치를 따라다니는 el

  • eye-container : 마우스 위치를 eye-point가 따라다니는 영역

    • eye-input 또는 eye-textarea 가 focus된 상황이라면 eye-point가 따라오지 않음
    • 단, always 키워드를 추가하는 경우 focus된 상황에서도 마우스가 움직이면 이를 쳐다봄
  • eye-input : input 창에 focus 된 상태에서 입력된 value의 마지막 부분을 eye-point가 쳐다봄

  • eye-textarea : eye-input 과 마찬가지로 textarea 창에 focus 된 상태에서 입력된 value의 마지막 부분을 eye-point 가 쳐다봄