Samples
Transitions
Chasse doesn't ship an animation engine. A transition returns whatever animates the pages, so these use the Web Animations API, CSS, GSAP and the browser's View Transitions API. Click one to see it run. Each page shows the code that ran, and a phone can swipe through them.
Web Animations API
The browser's own animation API. No library: each transition returns an animation and Chasse waits for it.
01 · out-in
Fade
The old page fades away, then the new one fades in. The safest default.
02 · sync
Slide
Both pages move together. It is also what a swipe scrubs, so try dragging on a phone.
03 · in-out
Cover
The new page rises over the old one first. The old page leaves after.
04 · sync
Circle
The new page opens from the exact point you clicked.
05 · sync
Wipe
A clean top-to-bottom reveal while the old page drifts up.
06 · out-in
Zoom
The old page shrinks away and the new one settles in from slightly larger.
07 · sync
Stack
The old page steps back and dims while the new one slides up over it.
CSS
The motion is a CSS transition on a data attribute. The transition only changes the attribute and waits for it to end.
GSAP
Chasse works with any animation library, or none. GSAP is one option, loaded only when this transition first runs.
View Transitions API
The browser snapshots the old page and animates it against the new one with CSS. Chasse starts it as the old page leaves and releases it once the new page is in.
10 · out-in
Morph
The title morphs from one page into the next. This is what the API does best: elements with the same name on both pages move and resize into each other.
11 · out-in
Slide
The browser snapshots both pages and slides them. All of the motion is a few lines of CSS.
12 · out-in
Wipe
A top-to-bottom reveal made by animating the new page snapshot's clip-path.
13 · out-in
Circle
A circle from where you clicked, with the origin handed to the CSS as custom properties.