Skip to content

rohitnishad613/Awesome-cursor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Awesome-cursor

A Tiny JS library to GET custom awesome cursor for website.

Installation

CDN

Use this CDN Link to get Awesome-cursor.

https://cdn.jsdelivr.net/gh/rohitnishad613/Awesome-cursor/awesome-cursor.js

Setup

Add 3 script tag in your page.

<script src="https://cdnjs.cloudflare.com/ajax/libs/paper.js/0.12.0/paper-core.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/simplex-noise/2.4.0/simplex-noise.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/rohitnishad613/Awesome-cursor/awesome-cursor.js"></script>

then just call it as,

<script>
  AwesomeCursor({}); // important
</script>

Customization

<script>
  let options = {
     cursor_color = "rgb(255, 0, 0)",
     cursor_size = 7,
     cursor_canvas_color = "rgba(255, 0, 0, 0.5)",
     cursor_canvas_radius = 15,
     cursor_canvas_strokeWidth = 2,
  }
  AwesomeCursor(options);
</script>
Option Default Value Description
cursor_color "rgb(255, 0, 0)" Color of small dot in cursor.
cursor_size 7 Size of small dot in cursor.
cursor_canvas_color "rgba(255, 0, 0, 0.5)" Color of animated border of dot.
cursor_canvas_radius 15 Border Radius of animated border of dot.
cursor_canvas_strokeWidth 2 Width of Border Radius of animated border of dot.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

About

Tiny JS library to GET custom awesome cursor for website.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published