CSS View Transitions Generator

Animate page and state changes with the View Transitions API and get the CSS that styles them.

Use the tool

Why this tool exists

Choose the page transition effect, duration and an optional shared element name and selector. The output enables cross-document transitions with @view-transition, styles ::view-transition-old/new(root) with matching keyframes, gives the shared element a view-transition-name, switches animations off under prefers-reduced-motion, and includes a small startViewTransition wrapper with a fallback for browsers without the API.

Support varies (same-document transitions are widespread; cross-document ones are newer), and view-transition-name must be unique on the page at one time.

No data is sent anywhere: the work happens in your browser, so you can use it offline once the page has loaded.

How to use it

  1. Choose the effect and duration.
  2. Name the shared element if you want a morph.
  3. Copy the CSS and JavaScript.
  4. Test with reduced motion enabled.

Frequently asked questions

What is a shared element transition?

An element with the same view-transition-name before and after the change morphs between its two positions.

Do multi-page sites work?

Yes in browsers that support cross-document view transitions, with the @view-transition rule.

Why must names be unique?

The browser pairs old and new snapshots by name; duplicates break the transition.

Is my data sent anywhere?

No. Everything is processed in your browser, and the page makes no network requests with your input.