0.1.7 • Published 10 years ago

react-mouse-pointer-tools v0.1.7

Weekly downloads
22
License
MIT
Repository
-
Last release
10 years ago

react-mouse-pointer-tools

npm version

Here's a link to the project on GitHub: https://github.com/koalabears/react-mouse-pointer-tools

react-mouse-pointer-tools is a react component that provides a toolkit for tracking the pointer position of the mouse. The toolkit provides both the x and y coordinates printed beside the pointer as well as optional horizontal and vertical rules for precision tracking. The colour of the lines and coordinates are customisable with the props see the example use case below

gif

Example of how to use - add this code to your main.js file

var React         = require('react');
var ReactDOM      = require('react-dom');
var PointerTools  = require('react-mouse-pointer-tools');
var rootElement   = document.body.getElementById("wrapper");

ReactDOM.render(
  <PointerTools color="pink" showRulers={true} />,
  rootElement
);
PropDefaultTypeDescription
showRulerstruebooleandisplays/hides rulers
color'black'stringchanges the colour of rulers and coordinates

Why would you use it?

  • Styling tool for web app layout
  • User screen tracking
0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago