Skip to content

How to trigger exit animation without LiveMotion.JS call #8

Description

@oliverswitzer

Hi!

Sorry for the barrage of issues, but I was wondering if there is a way to trigger the exit animation of a component via toggling a prop on the LiveMotion.motion component?

The docs outline a way to do trigger exit animations via a LiveMotion.JS call, but I can't seem to find a prop that will allow me trigger the exit animation by toggling the value of a prop.

Looking for something along the lines of:

            <LiveMotion.motion
              id="foo"
              show={@some_state_on_my_socket}
              animate={[y: 20, opacity: [0, 1]]}
              exit={[y: 0, opacity: [1, 0]]}
              transition={[duration: 1.5]}
            >

where toggling @some_state_on_my_socket to true or false would trigger the animate and exit animations respectively.

Is this supported? Thanks!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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