user-interaction-js
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

user-interaction-js

A lightweight JavaScript library for capturing and recording user interactions like clicks, scrolls, and inputs on web pages.

Example

import { Recorder } from "user-interaction-js";

/* configure mouse over style for the elements when enableMouseOverStyle is set to true */
const recorder = new Recorder({
  config: {
    enableMouseOverStyle: true,
    mouseOverStyle: { border: "dashed red", boxSizing: "border-box" },
  },
});

const logData = (data) => console.log(data);
recorder.subscribe(logData);
recorder.start();
...
recorder.stop();

The mouse over style specified above will look like this when recorder script is running

Package Sidebar

Install

npm i user-interaction-js

Weekly Downloads

5

Version

0.0.3

License

MIT

Unpacked Size

14.9 kB

Total Files

6

Last publish

Collaborators

  • mepsilon