Skip to content

Add isView prop to AnimatedSpan and TypingAnimation for on-view anima… #703

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheCoree
Copy link

…tion trigger

Description

Added isView prop to AnimatedSpan and TypingAnimation to trigger animations only when the component is visible (using IntersectionObserver). This improves UX by preventing animations from running for elements outside the viewport. The delay prop is preserved and applied correctly when the component becomes visible.

How to Test

  1. Set isView={false} in AnimatedSpan and TypingAnimation with different delay values (e.g., delay={500}).
  2. Scroll to the terminal and verify animations start only when visible, respecting the delay.
  3. Set isView={true} to confirm original behavior (animations on page load with delay).

Changes

  • Added isView prop to AnimatedSpan and TypingAnimation.
  • Implemented IntersectionObserver for visibility-based animation triggers.
  • Ensured delay is applied correctly when component becomes visible.

Copy link

vercel bot commented Jun 15, 2025

@TheCoree is attempting to deploy a commit to the product-studio Team on Vercel.

A member of the Team first needs to authorize it.

@itsarghyadas
Copy link
Collaborator

is the #702 is accidentally created @TheCoree ?

@TheCoree
Copy link
Author

is the #702 is accidentally created @TheCoree ?

yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants