Pagefold

v0.3.1 · MIT

Pages that fold into each other.

Page transitions for server-rendered websites. Keep your HTML, add one container and one line of JavaScript.

Up and running in three pieces

1

Mark the container

<main id="pagefold" class="transition-fade">
  ...
</main>
2

Style the transition

.transition-fade { transition: opacity .3s }
html.is-animating .transition-fade {
  opacity: 0
}
3

Start it

import Pagefold from 'pagefold'

new Pagefold()

Add only what you need

Every module is a separate import, and the sizes below are what each one adds. Nothing you do not use reaches your bundle.

Every module has its own page with when to use it and every option. Start with the guide.