[feat]: Native ability to switch to a new "idle" (looped) animation after the first (entrance) animation completes

Open
#2,062 6 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
30/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
react, typescript
Domain
frontend

Research direction

Start by reviewing the existing useSpring API and the animation examples, especially how completion of the initial from/to animation is handled. Determine the supported API shape for a looped idle animation and define a representative entrance-to-idle example. Done means the behavior and API are implemented and the examples section demonstrates the seamless transition.

Written by the indexing model from the issue text.

Description

template: request
A clear and concise description of what the feature is

I'd like to be able to add an "idle" animation, perhaps which accepts another useSpring-defined variable, or a from and to (or any other way which makes sense).

The idea would be to loop this animation once the initial "from" and "to" has completed.

Why should this feature be included?

Whether or not there is already a recommended way to go about doing this then it would be really great to see something like this in the examples section, since I imagine a lot of people would benefit from the ability to have their animations seamlessly transition from the "entrance" animation to an "idle" (looped) animation.

Please provide an example for how this would work

An "idle" animation (e.g. idle useSpring prop), perhaps which accepts another useSpring-defined variable, or a from and to (or any other way which makes sense).

Kindest Regards,
Jay

P.S. I have not been able to join via the Discord link, it might be worth creating a new invite link.

Dominant language
TypeScript
Stars
29.3k
Forks
1.2k
Avg merge
3d 15h
Merged PRs (30d)
17

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pmndrs/react-spring

All issues in pmndrs/react-spring

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.