Skip to content
Back to the lab

RouteTransition · any in-site link

The frosted page transition

On any in-site link, a frosted layer covers the current page first and is removed once the new page has loaded. It runs on every page change, so a button here plays it in place.

Source · GitHub

RouteTransition intercepts clicks on in-site links: it covers the page with the frosted layer, waits for the new route's content to load and then removes the layer, so the page changes while covered and the reader never sees a blank screen. External links, file links marked data-no-transition and clicks with a modifier key are not intercepted. It only appears during a page change, and a link to the current page does not trigger it, so RouteTransition has one event used only by the lab: the button covers the page in place, holds briefly and uncovers it, using the same cover and reveal, without changing the page or the scroll position.

Source

Source files on GitHub:

Back to the lab