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

Control speed of animation #30

Open
yairhaimo opened this issue Dec 9, 2020 · 9 comments
Open

Control speed of animation #30

yairhaimo opened this issue Dec 9, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@yairhaimo
Copy link

Is there a way to control the speed of the animation?
Specifically using the snapTo method.

(Awesome, awesome library!)

@stipsan
Copy link
Owner

stipsan commented Dec 9, 2020

Heya, react-spring support it. If I expose it like this:

ref.current.snapTo(({maxHeight}) => maxHeight, {duration: 250})

would that work for you?

@stipsan stipsan added the enhancement New feature or request label Dec 9, 2020
@yairhaimo
Copy link
Author

That would be great. Thanks!

@simonrelet
Copy link

Hello there!
@stipsan Huge thanks for the library 🙏

Would it be conceivable to also have an API to set the duration/spring config at the component level?
ref.current.snapTo() could "use it" by default and override it if a config is passed as parameter.

What do you think?

@stipsan
Copy link
Owner

stipsan commented Feb 3, 2021

@simonrelet yes that is the idea. The reason I've held off on it though is that these options are different in the upcoming version of react-spring, v9. I could compromise on using an unstable_ prefix on this prop/option while we're on v8. If I add it now understand that these options will be a "use at your own risk" kind of deal.

@otox-rz
Copy link

otox-rz commented Feb 25, 2021

Hi @stipsan , I think we will have the good news soon .

Release Plan v9 of react-spring

@ejabu
Copy link

ejabu commented Mar 23, 2021

Hi @stipsan , we have a good news from React Spring side.

Finally the version 9 is merged

@stipsan
Copy link
Owner

stipsan commented Mar 24, 2021

Brilliant 🎉 Btw, @otox-rz and @ejabu, what's up with the 🍔 themed avatars? 😂

@ejabu
Copy link

ejabu commented Mar 24, 2021

Brilliant 🎉 Btw, @otox-rz and @ejabu, what's up with the 🍔 themed avatars? 😂

lol, I had to create another account to conform my office rules, using Work email for git user. 🤣

@Agrejus
Copy link

Agrejus commented Jan 3, 2023

FYI - Here is an answer for changing the speed

#151 (comment)

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

No branches or pull requests

6 participants