1.0.1 • Published 5 years ago

xpr-custom-cursor v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

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! :)