W3cubDocs

/CSS

view-transition-name

Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The view-transition-name CSS property provides the selected element with a distinct identifying name (a <custom-ident>) and causes it to participate in a separate view transition from the root view transition — or no view transition if the none value is specified.

Syntax

/* <custom-ident> value examples */
view-transition-name: header;
view-transition-name: figure-caption;

/* Keyword value */
view-transition-name: none;

Values

<custom-ident>

A distinct identifying name that causes the selected element to participate in a separate view transition from the root view transition. The identifier must be unique. If two rendered elements have the same view-transition-name at the same time, ViewTransition.ready will reject and the transition will be skipped.

none

The selected element will not participate in a view transition.

Formal definition

Value not found in DB!

Formal syntax

view-transition-name = 
none |
<custom-ident>

Examples

figcaption {
  view-transition-name: figure-caption;
}

Specifications

Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
view-transition-name 111 111 No No 97 No 111 111 No No No No

See also

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/CSS/view-transition-name