CSS View Transition Generator
Simulate 'View Transition API' animations and CSS
(::view-transition-old/new) directly in your browser.
Choose a Preset
Preview
Generator Settings
※ Endpoint (To) for the ::view-transition-old (the exiting state)
※ Startpoint (From) for the ::view-transition-new (the entering state)
Generated Code
You might also like
CSS View Transition Generator Overview
The CSS View Transition Generator is a completely free, developer-friendly tool that lets you visually build and preview smooth page transition animations using the next-generation 'View Transition API' right in your browser.
Traditionally, achieving seamless transitions between screens required complex JavaScript animation libraries, especially in SPAs. Now, you can easily accomplish this with native browser features and CSS alone. You can fine-tune animations (translate, scale, rotate, fade) for both exiting elements (old state) and entering elements (new state), and instantly copy the code as CSS, JavaScript (for SPAs), and HTML (for MPAs).
All processing happens entirely within your browser. Your configurations and data are never sent to external servers, ensuring complete privacy and security.
How to Create Transition Animations
Choose a Preset or Basic Settings
Select a preset like 'Fade' or 'Slide Left' from the top, or enter a 'view-transition-name' to define your base state.
Preview and Tweak Animations
Click the 'Play / Toggle State' button to see the actual transition. Adjust parameters in the 'Old' (exit) and 'New' (enter) animation tabs to create your ideal effect.
Copy and Apply the Code
Copy the generated code from the 'CSS', 'JavaScript', and 'HTML' tabs respectively, and integrate them into your project.
View Transition Glossary
- View Transition API
- A mechanism where the browser automatically captures screenshots of the DOM before (old state) and after (new state) a change, seamlessly animating between them. The biggest advantage is creating rich screen transitions with native performance without relying on heavy JavaScript libraries.
- view-transition-name
- A CSS property used to identify the elements to be animated. Elements with the same name in the old and new DOM are linked and animated together. If multiple elements in the same page share a name, the transition will fail, so unique identifiers are crucial.
- ::view-transition-old / new
- `old` is a pseudo-element containing the screenshot of the "old state" before the transition, controlling the exit effect. `new` is a pseudo-element for the "new state", controlling the entrance effect. By applying custom CSS animations to these, you can create fully customized transitions.
- Cross-document View Transitions
- An extension of the specification that allows screen transitions between MPAs (Multi-Page Applications) to be animated simply by specifying meta tags, beyond just JS-driven SPAs. This enables traditional websites to provide an app-like experience easily.
Frequently Asked Questions (FAQ)
- Q.Is my data sent to a server?
- No, this tool operates entirely within your browser. None of your input or settings are sent to any external server. It works securely even offline.
- Q.Will the View Transition animation work on all browsers?
- It is supported in Chrome 111+, Edge 111+, Safari 18+, etc. For unsupported browsers like Firefox, it safely falls back to a regular instant page change (progressive enhancement) without breaking your site.
- Q.Can I use it for MPAs (Multi-Page Applications) as well?
- Yes, you can use it for MPAs on the same origin. By adding `<meta name="view-transition" content="same-origin" />` to your HTML `<head>` and assigning a `view-transition-name` to elements via CSS, you can implement transition animations without writing any JavaScript.
- Q.What should I use for view-transition-name?
- Specify any string that is completely unique within the page (e.g., `main-content`, `hero-image`, `card-123`). If the same name exists on multiple elements in the DOM simultaneously, the animation will fail. It's recommended to dynamically include unique IDs for list items.
Use Cases
Here are typical implementation examples using the View Transition API.
Product Details in E-Commerce
When clicking a thumbnail on a product list page, the image seamlessly expands into the product details page. This rich experience keeps the user's attention and can contribute to higher conversion rates.
Native App-like UI Flows
You can achieve lightweight, native app-style animations directly in the browser—like screens sliding left and right in response to swipes or clicks. Perfect for PWAs (Progressive Web Apps).
Dark Mode Toggles
Instead of the screen instantly turning dark, you can add unique animation effects, like a circle of color expanding from the toggle button when dark mode is enabled.
List Sorting and Filtering
When filtering or reordering an item list, removed elements can fade out while remaining elements smoothly glide to their new positions. This visual cue greatly improves user understanding of UI changes.
Send Feedback
Please let us know your thoughts to help us improve the tool.
Feedback is temporarily suspended
The server is busy or spam protection is active. Please try again later.