Mithril.js: Support for list animations

Created on 26 Nov 2017  路  6Comments  路  Source: MithrilJS/mithril.js

I'm currently deciding between Vue and Mithril, and a major issue for me is the list animations, they really blew me away.

https://vuejs.org/v2/guide/transitions.html#List-Move-Transitions

Shouldn't there be some similar support for list animations in Mithrill? It would also be great if the tutorial covered not just entry/exit, but also toggling, etc. with runnable examples.

Question

Most helpful comment

here is another simplified version, which unfortuatelly only works with @pygy's patches in place. They should land in core any time soon I hope.

All 6 comments

I'd personally prefer this to be done as a library. If there isn't one already, we'd definitely encourage someone to write such a component and open source it.

hadn't heard of FLIP, but in a vdom lib like mithril, the FLIP pattern can effectively be done via state based transitions with ontranstionend.

that's pretty much what i'm doing in the stateful router / page transition example here: https://cavemansspa.github.io/pagetransition-route-resolver

Here is a flems that demonstrates how you can do that.

Creating a small lib is pretty strait forward I think.

Unfortunately mithril has some problems keeping dom-nodes in random lists. It's currently addressed if not already fixed by @pygy.

here is another simplified version, which unfortuatelly only works with @pygy's patches in place. They should land in core any time soon I hope.

Looks super nice @StephanHoyer!

This will be part of Mithril v2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

isiahmeadows picture isiahmeadows  路  4Comments

dhinesh03 picture dhinesh03  路  4Comments

StephanHoyer picture StephanHoyer  路  4Comments

raykyri picture raykyri  路  4Comments

simov picture simov  路  4Comments