Open
Description
ViewTransition
does not animate if a name
prop starting with a number is provided. Presumably this is because the name is being used as a CSS class, but that is not obvious from the documentation.
React version: experimental
Steps To Reproduce
- Create a ViewTransition with the name "1name" that wraps an element
- Insert or remove the ViewTransition
Link to code example: https://codesandbox.io/p/sandbox/hopeful-dawn-cfgv64
The current behavior
Animation does not fire and no errors or warnings present
The expected behavior
One of the following:
- The ViewTransition applies (e.g. by escaping the name)
- An warning is logged for invalid ViewTransition name
- The React docs are updated to call out that name must be a valid CSS name