# view-transition-name

> The `view-transition-name` CSS property gives an element a unique name to animate it separately during a view transition.

## What is view-transition-name in CSS?

The property that assigns a unique identifier to an element so the browser captures it separately during a view transition. Elements with the same name in the old and new states are animated smoothly between their positions and sizes.

- Topic: View Transitions
- Type: property
- Browser support: Chrome 111+, Chrome Android 111+, Edge 111+, Firefox 144+, Firefox Android 144+, Safari 18+, Safari iOS 18+

## Example

Wrong:

```css
.card {
  view-transition-name: card;
}
```

Right:

```css
.card {
  view-transition-name: match-element;
}
```

One shared name on many cards makes the transition skip; `match-element` gives each card its own name.

## Common mistakes

- Two visible elements share one name, so the transition is skipped.

## Key points

- Each name is unique among elements on the page when the transition starts.
- List items get their own names, through `match-element` or per-item values, not one shared name.
- Names are given only to elements that need their own animation, not to everything.

## Interview questions

### What does view-transition-name: none do?

'none' is the default; the element is captured as part of the page snapshot, not on its own.

### Do I need JavaScript to use view-transition-name?

Not for page navigations that opt in with `@view-transition { navigation: auto; }`. Same-page updates call `document.startViewTransition()`.

## Related cards

- [document.startViewTransition()](https://wonderium.dev/js/start-view-transition.md)
- [::view-transition-group()](https://wonderium.dev/css/view-transition-group.md)
- [view-transition-class](https://wonderium.dev/css/view-transition-class.md)
- [::view-transition](https://wonderium.dev/css/view-transition.md)
- [:active-view-transition](https://wonderium.dev/css/active-view-transition.md)

---

- Level: [CSS](https://wonderium.dev/css.md)
- HTML version: https://wonderium.dev/css/view-transition-name
- Last updated: 2026-11-25
