Skip to content

A lightweight yet impressive CSS/JS button animation system with dynamic color customization. This project demonstrates how to create engaging UI elements with minimal code.

License

Notifications You must be signed in to change notification settings

casparml/Magical-Button-Hover-Effect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Magical Button Hover Effect

A lightweight yet impressive CSS/JS button animation system with dynamic color customization. This project demonstrates how to create engaging UI elements with minimal code.

Button Hover Effect Demo

Features

  • 3D perspective hover animations with smooth transitions
  • Dynamic color customization via HTML data attributes
  • Elegant shine effect that sweeps across buttons
  • Anti-jitter technology for seamless interaction
  • Cross-browser compatible design

The buttons feature a satisfying tilt effect, subtle scaling, and customizable glow effects that match each button's unique color scheme. Simply add your desired color values as data attributes and the system automatically generates the appropriate animations and effects.

Perfect for designers and developers looking to add that extra touch of interactivity to forms, landing pages, or call-to-action elements without the bloat of animation libraries.

Installation

# Clone the repository
git clone https://github.com/casparml/Magical-Button-Hover-Effect.git

# Navigate to the project directory
cd Magical-Button-Hover-Effect

# Open index.html in your browser or use a live server

Usage

<button class="magic-btn" data-color="#5e60ce" data-color2="#4ea8de">Hover Me</button>

Customization Options

Option Description Default
data-color Primary button color #5e60ce
data-color2 Secondary gradient color #4ea8de
data-intensity Hover effect intensity 0.8
data-shine Enable/disable shine effect true

Browser Support

  • Chrome 60+
  • Firefox 55+
  • Safari 11+
  • Edge 16+

Performance Tips

  • For best performance on mobile devices, use the lightweight version
  • Reduce animation intensity on pages with multiple buttons
  • Consider using the static fallback for very old browsers

Live Demo

Check out the live demo to see the buttons in action.

Contributing

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

License

MIT


Minimal code. Maximum impact.

About

A lightweight yet impressive CSS/JS button animation system with dynamic color customization. This project demonstrates how to create engaging UI elements with minimal code.

Topics

Resources

License

Stars

Watchers

Forks