View Transitions - Interactive Lab | IconVault
Animate SPA updates with document.startViewTransition: live shuffle demo, named elements, copyable CSS. Free, in-browser.
View Transitions
Animate SPA page changes
Your browser does not support View Transitions yet (needs Chrome 111+, Edge 111+ or Safari 18+). The demo still works, it just updates instantly instead of animating. Each card has a view-transition-name, so the browser morphs the old snapshot into the new one instead of re-rendering.
Live demo: shuffle the cards
Watch each card glide to its new slot. Without startViewTransition this would be an instant, jarring re-layout.
5 of 5 free runs left.
The CSS behind it
/* Give each moving element a stable name */
.card { view-transition-name: card-a; }
/* Animate the snapshots (this demo uses fade + slide) */
::view-transition-old(root),
::view-transition-new(root) {
animation-duration: 0.45s;
}
::view-transition-old(card-a) {
animation: 0.45s ease both fade-out, 0.45s ease both slide-out;
}
::view-transition-new(card-a) {
animation: 0.45s ease both fade-in, 0.45s ease both slide-in;
}
/* Cross-document transitions (MPA): one line in CSS */
@view-transition {
navigation: auto;
}SPA vs cross-document
- SPA (this demo): wrap your DOM update in document.startViewTransition(() => update()). Name the elements that should morph.
- Cross-document (MPA): add @view-transition { navigation: auto; } to your CSS and full page loads animate too, no JavaScript needed.
- Reduced motion: always respect prefers-reduced-motion and skip the transition for users who ask for it.
About this tool
IconVault's View Transitions playground shows the smoothest API you are probably not using. Hit shuffle and watch cards glide to their new slots, each with a stable view-transition-name so the browser morphs the old snapshot into the new one. Custom fade and slide keyframes on `::view-transition-old` and `::view-transition-new` control the choreography.
It is free and runs fully in your browser. The lab detects support honestly: unsupported browsers get an instant update instead of animation. Copy the CSS snippet for the SPA pattern plus the one-line `@view-transition` rule that animates full page loads on multi-page sites.
Frequently asked questions
Popular searches
More tools
Algorithm Visualizer
Watch sorting and searching animate step by step
Alt Text Helper
Write better image alt text with live feedback
ARIA Reference
Searchable ARIA roles and attributes guide
Array Visualizer
Step through map, filter, reduce like a debugger
Coming soon
CLI
Coming soon
Figma plugin
Coming soon
VS Code extension
Coming soon
Chrome extension
Coming soon
AI icon generator
Coming soon
Team workspaces
Coming soon