menu

Framer

The best prototyping tool for teams. Join our Discord chat for weekly classes and real-time help with Framer. http://framer.com/r/discord?utm=spectrum

Channels
Team

useNavigation - any way to know when the panel is opened or closed?

September 18, 2020 at 1:33am

useNavigation - any way to know when the panel is opened or closed?

September 18, 2020 at 1:33am
When using the useNavigation feature in code, particularly with an Overlay or CustomTransition, is there any way to run a function when the panel opens or closes? Per the documentation, you can do enter and exit animation states like:
Screen Shot 2020-09-17 at 6.31.51 PM.png
But I want to be able to run a custom function when the panel opens or closes ideally.

September 18, 2020 at 6:09am
I'm not 100% sure what you're looking to do, but would using something like this work? https://www.framer.com/api/utilities/#useisincurrentnavigationtarget
  • reply
  • like
Ooh interesting. i figured out a way to do it, but this utility function may come in handy soon. Thanks!
  • reply
  • like

October 6, 2020 at 7:12pm

📣 This community is no longer actively monitored, in favor of Discord

thumbsup
3
message-simple
0
  • reply
  • like