Animease is a utility package designed to make using animations easier for React projects. It provides a simplified react components for creating animations and transitions.
Made with ❤️ by Rishabh Gokhe
You can install Animease via npm:
npm install animease framer-motion
Note :
framer-motion
is a required dependency as Animease leverages it to provide its animation utilities.
Fade Animations - Preview
FadeUp
- Animates the component by fading it up after reload.FadeDown
- Animates the component by fading it down after reload.FadeRight
- Animates the component by fading it to the right after reload.FadeLeft
- Animates the component by fading it to the left after reload.
SVG Animations - Preview
AnimateSvgPath
- Animates SVG paths to create smooth transitions.
Parallax Animations - Preview
ParallaxImageAndText
- Creates a parallax effect when scrolling between an image and any JSX div (text recommended).
The FadeAnimations
component supports the following HTML element variants:
div
p
a
ul
h1
h2
h3
The component accepts the following properties:
delay
(number) : (Optional) Specifies the delay before the animation starts, in seconds.duration
(number) : (Optional) Sets the duration of the animation, in seconds. Defaults to0.5
seconds if not provided.variant
: Determines the HTML element to render. This must be one of the available variants (div
,p
,a
,ul
,h1
,h2
,h3
).children
(React.ReactNode) : A JSX component div can be placed in between components likeFade Animations
andParallaxImageAndText
as children.exitAnimation
(boolean) : (Optional) Whether to apply the exit animation. Defaults tofalse
.
The component accepts the following properties:
fillColor
(string) : (Optional) Specifies the color to fill the SVG path after animation (e.g.,rgb(255,0,0)
or#ff0000
).d
(string) : stores the path to be animatedduration
(number) : (Optional) Sets the duration of the animation, in seconds. Defaults to2
seconds if not provided.
The component accepts the following properties:
imageSrc
(string) : Specifies the location of the image.altText
(string) : (Optional) Alternate description of the image.children
(React.ReactNode) : A JSX component div can be placed in between components likeFade Animations
andParallaxImageAndText
as children.
Here’s a simple example to demonstrate how to use the FadeDown
component:
"use client";
import { FadeDown } from "animease";
const FadeDownCard = () => (
<FadeDown variant='div' delay={0.3} className="fade-down-card">
<div className="card-content">
<h2 className="card-title">FadeDown Div Element</h2>
<p className="card-description">
This div will animate with a fade-down effect and a delay of 0.3 seconds.
</p>
</div>
</FadeDown>
);
export default FadeDownCard;
- If you would like to contribute to the Animease project, please review our CONTRIBUTING.md file. This document outlines how to contribute effectively, including submitting issues, creating pull requests, and following project conventions.
- Scroll-Based Animations: Enhancing user engagement with animations that respond to scrolling actions.
- Parallax Scrolling: Adding depth and motion to the background elements as you scroll.
- Advanced Easing Functions: Introducing customizable easing options for more refined animation control.
- Interactive Animations: Creating animations that activate based on user interactions for a more dynamic experience.
We’re working hard to roll these out and make your animations even more powerful!
- Ensure that a
LICENSE
file is present in the repository to specify the terms under which the project is distributed. This file clarifies the legal aspects of using, modifying, and contributing to the project, ensuring transparency and compliance.
By adhering to these guidelines, you help maintain a well-organized and legally compliant project. Your contributions and feedback are highly appreciated!
Email Address : rishabhgokhe20contact@gmail.com