Skip to content

DevManSam777/custom-cursor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Custom Cursor Web Component

animated cursor gif

A reusable web component that creates a custom cursor with gradient trail effect.

Usage

  1. Include the script in your HTML:
<script src="https://raw.githack.com/DevManSam777/custom-cursor/main/custom-cursor.js" defer></script>
  1. Add the component to your page:
<custom-cursor></custom-cursor>
  1. Hide the default cursor:
body {
    cursor: none;
}

Themes

You can change the color theme using the theme attribute:

<!-- Default orange theme -->
<custom-cursor></custom-cursor>

<!-- Blue theme -->
<custom-cursor theme="blue"></custom-cursor>

<!-- Magenta theme -->
<custom-cursor theme="magenta"></custom-cursor>

Available themes: orange (default), blue, magenta

Example

<!DOCTYPE html>
<html>
<head>
    <style>
        body { cursor: none; }
    </style>
</head>
<body>
    <custom-cursor theme="blue"></custom-cursor>
    <h1>Your content here</h1>
    <script src="custom-cursor.js"></script>
</body>
</html>

Features

  • Multiple color themes (orange, blue, magenta)
  • Gradient trail effect
  • Click animation effects
  • Automatically hides on touch devices
  • No dependencies required
  • Works in all modern browsers

About

A custom cursor web component

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published