---
url: /reference/items/ViewTransition.md
---
# ViewTransition
The `ViewTransition` primitive is a drop-in alternative to the [`Transition`](/reference/items/Transition/) component that animates state changes with the native [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API) instead of CSS transition classes. It exposes the same `enter`, `leave` and `toggle` methods, so it can be used anywhere a `Transition` is.
The animation runs on a snapshot in the browser's view-transition layer, not on the live element. This avoids rendering glitches that CSS transforms can hit inside a top-layer `