Float Animation

FREE

A float animation for elements

Demo

PREMIUM

MAX

Acquire the MAX Plan

Unlock unlimited potential with our most advanced features and priority support.

All updates
All animations
No subscriptions
No hidden fees
$19.99
Payment once and get lifetime access

Float Animation

This is a simple float animation that you can use for elements that enter the viewport.

Installation

1

Copy and paste the following code into your project.

Add the class animate-float-custom to the element you want to animate.

global.css
 
@layer utilities {
 
 .animate-float {
    animation: float 3s ease-in-out infinite;
 }
 
 @keyframes float {
     from {
        transform: translateY(0);
     }
     to {
        transform: translateY(-20px);
     }
   }
 
}
 
2

Use the class animate-float-custom to apply the animation to an element.

<div class="animate-float">
    <!-- Your content here -->
</div>