question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature request: whileHover and whileTap props

See original GitHub issue

Hi Jay,

Congratulations on hitting it out of the ballpark with legend-motion.

One of my favorite features from framer-motion are the whileTap and whileHover props.

Is this something you would consider adding too?

Thanks!

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
jmeistrichcommented, May 27, 2022

Yes you’re right @nandorojo. I’ve been doing mostly web development recently so I was thinking too much like web.

In version 2.0.0 I added a Motion.Pressable. whileTap and whileHover now require a Motion.Pressable ancestor, which is uses for tracking whether it is hovered or pressed. You can use it like this:

<Motion.Pressable>
    <Motion.View
        whileHover={{ scale: 1.2 }}
        whileTap={{ y: 20 }}
    />
</Motion.Pressable>
1reaction
jmeistrichcommented, May 26, 2022

Good point! I will look into passing the Pressable props through.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] whileTap and whileHover props do not work as ... - GitHub
Describe the bug whileTap and whileHover props do not work as expected on elements inside an iFrame. 3. IMPORTANT: Provide a CodeSandbox ...
Read more >
Framer-Motion: New And Underestimated Features - Shakuro
Motion component allows us to animate visual representations of interactive elements with whileHover, whileTap, whileDrag and whileFocus props.
Read more >
Gestures | Framer for Developers
motion components provide multiple gesture animation props: whileHover , whileTap , whileFocus , whileDrag and whileInView . These can define animation ...
Read more >
framer-motion/CHANGELOG.md - UNPKG
115, - Fixing unsetting `whileHover` and `whileTap` if they contain ... 117, - Checking animation props for array variants as well as strings....
Read more >
framer-motion | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn. ≡. Home · Getting started · Features.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found