Lifetime updates on every purchase Support replies within 24 hours Secure checkout via Gumroad 8,500+ sales since 2016

Custom animations

Updated 1 min read 8 views

Describe the forward move. in is for the opening level, out is for the level that leaves. Going back plays both reversed.

new LayerMenu('.menu', {
  animation: {
    in:  [{ opacity: 0, transform: 'translateY(40px)' }, { opacity: 1, transform: 'none' }],
    out: [{ opacity: 1, transform: 'none' }, { opacity: 0, transform: 'translateY(-40px)' }],
  },
});

// or register it once and use it by name
LayerMenu.animations.rise = { in: […], out: […] };
Was this article helpful?