View Transition Generator
Animate between page states the modern way. Pick an effect, preview it live, copy the code.
The toggle swaps the preview between grid and list using document.startViewTransition, animated by the exact CSS this page generates for you.
Your Code
Page transitions without the animation plumbing
Native-feeling motion used to be the web's missing piece: apps glided between screens while websites jumped. The View Transitions API closes that gap with a snapshot trick. The browser photographs the current state, you change the DOM however you like, and it animates between the two photographs using ordinary CSS animations attached to ::view-transition-old and ::view-transition-new. Because you style pseudo-elements instead of orchestrating elements, one snippet restyles every state change on the page.
This generator produces the two halves you need: the effect CSS for the root transition, and the startViewTransition wrapper for your state change. Two upgrades build naturally on top of it: give individual elements a view-transition-name for shared-element morphs, and add @view-transition { navigation: auto; } to animate between full page loads on the same site.
How to use this generator
- Pick an effect and a duration. Shorter feels snappier; 250–400ms suits most UI state changes.
- Click Toggle Layout to watch the preview animate between grid and list with your settings.
- Copy the code: paste the CSS into your stylesheet and wrap your own DOM change in the JavaScript function.
- Respect reduced motion: the generated CSS includes a prefers-reduced-motion guard that disables the animation for users who ask for calm.
Frequently Asked Questions
Check Out Other Popular Tools
Free Audio Translator
Record your voice, get instant speech-to-text transcription, and translate to multiple languages. 100% private browser-based processing.
Decimal to Fraction Calculator
Convert any decimal to a fraction instantly. See step-by-step mathematical working and handle repeating decimals or mixed numbers.
Base64 Encoder & Decoder
Encode text to Base64 or decode Base64 strings back to readable text. Perfect for encoding data for transmission.
Was this tool helpful?
Comments
Loading comments...