xpr-custom-cursor
v1.0.1
Published
A small package to help with adding custom cursors to a page.
Downloads
1
Readme
XPR Custom Cursor
How to use:
Install & require:
$ npm i xpr-custom-cursor --save
var XPRCustomCursor = require('xpr-custom-cursor');
Init:
// optional container el. if no container is specified, it will append to the body.
var container = document.querySelector(...);
// optional opts, but markup is probably necessary ;)
var opts = {
markup: '<span>custom cursor!</span>',
styles: {
color: 'red'
}
}
var cursor = new XPRCustomCursor(container, opts);
Important: You'll have to style the inner markup yourself via classes or something. Also, if you're using Browserify, install browsernizr! :)