Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support View Transitions API #131

Open
gampleman opened this issue Mar 10, 2023 · 1 comment
Open

Support View Transitions API #131

gampleman opened this issue Mar 10, 2023 · 1 comment

Comments

@gampleman
Copy link

Chrome recently shipped the View Transition API, which allows to more seamlessly to animate transitions between different views using snapshots, which is particularly handy for immediate mode/VDOM based rendering, as this makes enter/exit animations particularly tricky.

The main thing to support this looks something like this:

 document.startViewTransition(() => patchTheDOM(patches));

Then there is a bunch of CSS syntax available to customise the transitions.

On the Elm side I don't know what the opt-in API would look like (perhaps an extra boolean field in Document?)

@Eptis
Copy link

Eptis commented Feb 27, 2024

@gampleman This might be of help. Diillon kearns made this example:
https://github.com/dillonkearns/elm-view-transitions?tab=readme-ov-file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants