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

spring misses { hard: true } (in Svelte 5 { instant: true }) #725

Open
newsve opened this issue Dec 12, 2024 · 2 comments
Open

spring misses { hard: true } (in Svelte 5 { instant: true }) #725

newsve opened this issue Dec 12, 2024 · 2 comments
Labels
documentation Improvements or additions to documentation

Comments

@newsve
Copy link

newsve commented Dec 12, 2024

Describe the bug

filed as a bug not as a feature since the spring docs mention Svelte's spring as role model which has this

hard or instant true lets you interrupt the spring, feels like a random implementation detail but is essential for polished spring animations which are a bit more advanced

Minimal Reproduction Link

na

@thetarnav
Copy link
Member

The setter accepts options object
setSpring(1000, {hard: true})
but it seems to be missing in the documentation
take a look at the implementation for details

@thetarnav thetarnav added the documentation Improvements or additions to documentation label Dec 12, 2024
@newsve
Copy link
Author

newsve commented Dec 12, 2024

Cool! Then, this should be seen as a doc issue or feel free to close it since we documented it trough this issue now.

Since they changed the key in Svelte 5 to instant which is a bit more intuitive, maybe it is a good idea to have an alias next to hard...

FWIW, I think Svelte's or this spring API is by far the best around not requiring a huge dep, actually the reason I use Svelte, so I was so happy to see to available for Solid. 🙂

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

No branches or pull requests

2 participants