Smooth page changes without rebuilding your website
When a visitor clicks to the next page, it can glide in instead of flashing white. Here is what that does for your customers and what it takes.
What this means for you
- Visitors keep their place. The product they clicked moves into position instead of the page going blank.
- Your site stays as it is. No rebuild, no app and no extra loading time.
- Visitors on older browsers get the usual page change. Nothing breaks for them.
Try it
Click a product below, then go back. Now switch the animation off and do it again. That difference is what this article is about.
Same page, same speed. Only the change feels different.
Why pages flash white
Most websites are a set of separate pages. When you click a link, the browser throws the old page away and paints the new one from scratch. For a split second there is nothing on screen, and your eyes have to find their place again.
Apps feel smoother because they never throw the screen away. For years, the only way to get that on a website was to rebuild it as a Single-page appA website that loads once and then swaps its content with JavaScript, instead of loading a new page for every click.. That is a big job, and it takes extra care to keep every page visible to search engines.
Browsers can now do it for ordinary websites. You tell the browser which parts belong together on two pages, and it animates between them while the next page arrives. That animation is called a Page transitionThe animation a visitor sees while one page of a website turns into the next..
Under the hood
This is the View Transitions API, in its cross-document form. When a link leads to a page of the Same originTwo pages share an origin when their addresses have the same domain, protocol and port, such as two pages on https://kooka-pacific.com., the browser takes a snapshot of the old page, loads the new one and crossfades the two. Elements that carry the same view-transition-name on both pages move and resize from their old place to their new one.
There is no JavaScript router and no state on the client. The new page is still a whole HTML document from the server, so prerendering, caching and search engines see exactly what they saw before.
What it takes
Rebuild as an app
A new way of loading every page, more JavaScript for every visitor to download, and extra work so search engines still see each page.
Smooth page changes
One line of CSS, plus a name for each part that should move. Your pages, your hosting and your place in search results stay as they are.
Some people feel unwell when things move on screen, and turn on Reduced motionA setting on phones and computers that asks apps and websites to keep animation to a minimum. on their phone or computer. A good setup respects that and changes pages instantly for them.
The code
Two pages, one rule
Both pages opt in. This rule is the whole switch:
@view-transition {
navigation: auto;
}Then give an element the same name on both pages. In a list every item needs its own name, so build it from the slug:
<img
src={product.image}
alt={product.name}
style={{ viewTransitionName: `product-${product.slug}` }}
/>And respect reduced motion. Without this rule the animation plays even for people who asked their system for less of it:
@media (prefers-reduced-motion: reduce) {
::view-transition-group(*) {
animation: none;
}
}Which browsers show it
Chrome, Edge and Safari animate page changes today, and Firefox does so in part. Older browsers simply change pages the usual way, so nobody gets a broken site.
Support in November 2026
| Browser | Within a page | Between pages |
|---|---|---|
| Chrome, Edge | 111 and newer | 126 and newer |
| Safari | 18 and newer | 18.2 and newer |
| Firefox | 144 and newer | Partly, from 144 |
Browsers without support ignore the at-rule and navigate as usual, so there is nothing to detect. The demo above uses the same-document form, document.startViewTransition(). Current numbers are on caniuse.com.
Want this on your site?
We add smooth page changes to existing websites and shops, and test them on real phones, with motion turned on and off.
Sources
- View Transition APIMDN Web Docs, checked
- View Transitions (cross-document)Can I use, checked
- prefers-reduced-motionMDN Web Docs, checked
- @view-transitionMDN Web Docs, checked
- CSS View Transitions Module Level 2W3C, checked
- WebKit Features in Safari 18.2WebKit, checked
- Firefox 144 for developersMDN Web Docs, checked
Words from this article
- Page transition
- The animation a visitor sees while one page of a website turns into the next.
- Single-page app
- A website that loads once and then swaps its content with JavaScript, instead of loading a new page for every click.
- Same origin
- Two pages share an origin when their addresses have the same domain, protocol and port, such as two pages on https://kooka-pacific.com.
- Reduced motion
- A setting on phones and computers that asks apps and websites to keep animation to a minimum.
Keep reading
QUERY: a new kind of web request for big questions
HTTP has a new method, QUERY. Shops and apps can send long searches and order lists without hitting address limits or giving up caching. Explained in plain English, with the code for developers.