Switch.framerfx icon indicating copy to clipboard operation
Switch.framerfx copied to clipboard

[Feature request] Allowing "click through" ability

Open jrcollins4 opened this issue 4 years ago • 1 comments

Great job on this library!

I have a tab component from our own component library that either requires code or the Switch library to implement the child view that corresponds to the current selected tab, and the Switch library makes this so much easier without our designers having to touch code.

Ideally, it would be nice to set up a Switch target on top a tab, change the view with the switch library, and then have the component execute the click as it would normally (since the active state is managed in the code component).

Is this currently achievable in Framer with the switch library? Would this be possible to implement in the future?

Thanks!

jrcollins4 avatar Mar 02 '20 23:03 jrcollins4

You should be able to do this using a SwitchToStateAction component (a hotspot). If you drop one on the canvas, notice that it has a connector dot on the side:

image

If you connect this dot to another component (it would need to be placed outside of the Frame), the hotspot will display that component, instead of being transparent). This will allow you to both handle your own tap events on the component AND have the SwitchToStateAction handle switching states.

tisho avatar Mar 23 '20 14:03 tisho