Hover Glow Animation
A hover glow animation for elements
Demo
MAX
Acquire the MAX Plan
Unlock unlimited potential with our most advanced features and priority support.
Hover Glow Animation
This is a hover glow animation that you can use for interactive elements.
Installation
Copy and paste the following code into your project.
Add the class hover-glow
to the element you want to animate.
@layer utilities {
.hover-glow {
position: relative;
transition: all 0.3s ease;
}
.hover-glow::before {
content: "";
position: absolute;
inset: -2px;
background: linear-gradient(45deg, #3b82f6, #8b5cf6);
border-radius: inherit;
opacity: 0;
transition: opacity 0.3s ease;
z-index: -1;
filter: blur(8px);
}
.hover-glow:hover::before {
opacity: 0.7;
}
}
Use the class hover-glow
to apply the animation to an element.
<div class="hover-glow">
<!-- Your content here -->
</div>