tisho / Switch.framerfx

Utility component for Framer X that lets you switch between different states of an element
31 stars 4 forks source link

Smart Components with Variants triggers an JS error on transition #21

Open christophevouillamoz opened 3 years ago

christophevouillamoz commented 3 years ago

When using a smart component with variants within a Frame (which is used as a state of a Switch instance), Framer throws the following error on state change if the selected variant of the smart component is not the first variant. In the preview you will recognize it with a lack of animation. The animation will stuck around 0.2 seconds of animation time.

js_error

The smart component is a button that uses hover and pressed state and variants of colors as well. The smart component has optional icons left and right (Material Package) that are hidden by default (in tests they did not affect the error).

smart_component

I created a Framer project to test & reproduce it: https://framer.com/share/Switch-Smart-Component-Bug--vGNyAas6SJMxj6MjlkJt/RJEJsG3kl

test