Scroll and Mouse movement
Closed this issue · 3 comments
Loving this package, so easy to use and perfect for what I need (been trying to move away from scroll magic for simple bits).
I've just got a question, is it possible for a container to interact on scroll and mouse movement.
For example, having an image scale on scroll but the mouse controlling the translation relative to the mouse.
Thanks in advance
Hello! Thanks a lot for your words! I'm glad that you like it and find it easy to use.
It depends on what your use case is but here is my suggestion:
<kinesis-container>
<kinesis-element>
<kinesis-scroll :strength="5" type="scale" tag="img" src="https://placeimg.com/600/200/any?1"/>
</kinesis-element>
</kinesis-container>
I made a codesandbox
so you can play around with it:
https://codesandbox.io/s/laughing-panini-0veys
I'm using a kinesis-scroll
inside a kinesis-element
. Basically, kinesis-scroll
is a component that doesn't depend on a container but reacts to scroll.
Let me know if it helps and if it's still optimal for what you want to achieve. If not I will try to think of a solution.
Perfect thank you for that, I'll give it ago.
Might be worth adding to the readme
👍
Great!
Yes, I'll do so. I'm working on improving the doc and the demo page.