Skip to content

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

@christophevouillamoz

Description

@christophevouillamoz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions