This repository is dedicated to learning and experimenting with GSAP (GreenSock Animation Platform), a powerful JavaScript library for creating high-performance animations. Each folder contains examples, tutorials, and practice exercises using HTML, CSS, and JavaScript to demonstrate the capabilities of GSAP.
- Description: Basic GSAP animations for elements like boxes and text.
- Features:
- Simple animations using
gsap.to()andgsap.from(). - Movement, rotation, scaling, and color changes.
- Simple animations using
- Files:
index.htmlstyle.cssscript.js
- Description: Introduction to GSAP timelines for sequencing animations.
- Features:
- Chaining animations using
gsap.timeline(). - Sequential animations for multiple elements.
- Chaining animations using
- Files:
index.htmlstyle.cssscript.js
- Description: Animations for navigation bars and headings.
- Features:
- GSAP animations for navigation links and headings.
- Staggered animations for multiple elements.
- Files:
index.htmlstyle.cssscript.js
- Description: Scroll-based animations using GSAP ScrollTrigger.
- Features:
- Animations triggered by scrolling.
- Scroll-triggered movement, opacity, and scaling effects.
- Files:
index.htmlstyle.cssscript.js
- Description: Pin elements during scroll using GSAP ScrollTrigger.
- Features:
- Pinning elements while scrolling.
- Scroll-triggered animations with pinning.
- Files:
index.htmlstyle.cssscript.js
- Description: Animations for SVG paths using GSAP.
- Features:
- Dynamic SVG path animations on mouse interaction.
- Smooth transitions using GSAP.
- Files:
index.htmlstyle.cssscript.js
- Description: Custom cursor animations using GSAP.
- Features:
- Custom cursor that follows mouse movement.
- Smooth transitions and easing effects.
- Files:
index.htmlstyle.cssscript.js
- Description: Custom cursor with image hover effects.
- Features:
- Custom cursor changes on image hover.
- Text and scale animations on hover.
- Files:
index.htmlstyle.cssscript.js
- Description: Animated navigation bar with GSAP.
- Features:
- Animated navigation menu toggle.
- Staggered animations for menu items.
- Files:
index.htmlstyle.cssscript.js
- Description: Text animations using GSAP.
- Features:
- Split text animations.
- Staggered animations for text characters.
- Files:
index.htmlstyle.cssscript.js
- Description: Advanced timeline animations for a digital agency website.
- Features:
- Hero section animations.
- Scroll-triggered animations for services and testimonials.
- Reusable animation functions for consistency.
- Files:
index.htmlstyle.cssscript.js
- Description: Multi-page e-commerce website with GSAP animations.
- Features:
- GSAP animations for navigation, hero sections, and cards.
- ScrollTrigger for scroll-based animations.
- Responsive design with mobile-friendly navigation.
- Contact form and interactive elements.
- Files:
index.html(Home)about.html(About)services.html(Services)contact.html(Contact)style.cssscript.js
-
Description: Using GSAP in a React environment to create dynamic and performant animations.
-
Features:
- GSAP animations integrated with React components.
- Use of useGSAP hook for React-safe animations.
- Examples of rotation, scaling, and movement animations.
- Responsive design with Tailwind CSS.
-
Files:
App.jsxcomponents/(React components for animations)pages/(React pages for different examples)tailwind.config.js(Tailwind CSS configuration)
-
Setup:
-
Install dependencies:
npm install gsap @gsap/react tailwindcss postcss autoprefixer
-
Run the project:
npm run dev
-
Clone the repository:
git clone https://github.com/abdulrahmans0414/gsap.git
-
Navigate to the desired folder:
cd gsap/01_basic -
Open
index.htmlin your browser to view the animations.
-
HTML: Structure of the web pages.
-
CSS: Styling and layout.
-
JavaScript: Logic and interactivity.
-
GSAP: Animation library for smooth and performant animations.
-
ScrollTrigger: GSAP plugin for scroll-based animations.
-
React: JavaScript library for building user interfaces.
-
Tailwind CSS: Utility-first CSS framework for responsive design.
Feel free to contribute by adding more examples, improving existing code, or suggesting new features. Open an issue or submit a pull request!
This project is open-source and available under the MIT License.