# ::view-transition-group()

> The `::view-transition-group()` CSS pseudo-element represents a single captured element during a view transition.

## How do I change the duration of a view transition?

The pseudo-element that represents a single captured element and animates its size and position between the old and new states. Commonly used to change the duration or easing of the transition for a specific element.

- Topic: View Transitions
- Type: pseudo-element
- Browser support: Chrome 109+, Chrome Android 109+, Edge 109+, Firefox 144+, Firefox Android 144+, Safari 18+, Safari iOS 18+

## Example

Wrong:

```css
::view-transition-old(hero) {
  animation-duration: 1s;
}
```

Right:

```css
::view-transition-group(hero) {
  animation-duration: 1s;
}
```

Position and size animate on the group, and the old and new images take their duration from it.

## Common mistakes

- Styling `::view-transition-old()` for movement, while position and size animate on the group.

## Key points

- Duration and easing for movement and size change are set on `::view-transition-group()`.
- The name in parentheses matches a `view-transition-name`, or `*` for all.
- Motion is removed or reduced inside `@media (prefers-reduced-motion: reduce)`.

## Interview questions

### How do I change the duration of all view transitions?

Target `::view-transition-group(*)`, since the old and new images inherit the duration from their group.

### What does ::view-transition-group(root) target?

The group for the page snapshot, which the browser names 'root' by default.

## Related cards

- [::view-transition](https://wonderium.dev/css/view-transition.md)
- [view-transition-name](https://wonderium.dev/css/view-transition-name.md)
- [::view-transition-old()](https://wonderium.dev/css/view-transition-old.md)
- [::view-transition-new()](https://wonderium.dev/css/view-transition-new.md)
- [view-transition-class](https://wonderium.dev/css/view-transition-class.md)

---

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