Skip to content
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

experimental: Text Animation storybook #4938

Merged
merged 5 commits into from
Mar 10, 2025
Merged

experimental: Text Animation storybook #4938

merged 5 commits into from
Mar 10, 2025

Conversation

istarkov
Copy link
Member

@istarkov istarkov commented Mar 3, 2025

Description

This PR introduces prototypes for a set of versatile animation components:
• AnimateProxy: A wrapper component supporting staggered animations and integrations with third-party animation engines.
• AnimateTextProgress: Demonstrates per-character staggered text animations.

👉 View Storybook Preview

Features
• Added Storybook examples showcasing text animation capabilities.
• Supports custom CSS properties within keyframes for enhanced animation flexibility.

Upcoming PRs

Future PRs will introduce more specialized animation components utilizing the AnimateProxy:

// Example usage of AnimateText
<AnimateProxy>
  {($progress, getStylesAt) => (
    <AnimateTextProgress
      $progress={$progress}
      getStylesAt={getStylesAt}
      charWindow={50}
      easing="easeInQuart"
    >
      {children}
    </AnimateTextProgress>
  )}
</AnimateProxy>

// Example usage of AnimateStager
<AnimateProxy>
  {($progress, getStylesAt) => (
    <Stager
      $progress={$progress}
      getStylesAt={getStylesAt}
      // Additional props...
    />
  )}
</AnimateProxy>

// Example usage of AnimateLottie
<AnimateProxy>
  {($progress, getStylesAt) => (
    <Lottie
      $progress={$progress}
      getStylesAt={getStylesAt}
      // Additional props...
    />
  )}
</AnimateProxy>

See corresponding PR: (link to be added)

Steps for reproduction

  1. click button
  2. expect xyz

Code Review

  • hi @kof, I need you to do
    • conceptual review (architecture, feature-correctness)
    • detailed review (read every line)
    • test it on preview

Before requesting a review

  • made a self-review
  • added inline comments where things may be not obvious (the "why", not "what")

Before merging

  • tested locally and on preview environment (preview dev login: 0000)
  • updated test cases document
  • added tests
  • if any new env variables are added, added them to .env file

@istarkov istarkov marked this pull request as ready for review March 6, 2025 17:40
@istarkov istarkov requested a review from TrySound March 6, 2025 17:40
istarkov added 3 commits March 9, 2025 17:06
Add nanonsotres

Add animation proxy

Fix

Safari + FF support

Rebuild

Perf and notes, preapare for Builder component

Add AnimateText component
@istarkov istarkov merged commit 70d5122 into main Mar 10, 2025
17 checks passed
@istarkov istarkov deleted the text-anim branch March 10, 2025 07:44
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.

1 participant