Bag of Tricks for View Transitions's Avatar

Bag of Tricks for View Transitions

@vtbag.dev

The πŸ‘œ Bag of Tricks ✨ for View Transitions | https://vtbag.dev The πŸ‘œ Bag of Tricks ✨ for Astro's View Transitions | https://events-3bg.pages.dev Tools, Info, Tips & Tricks Enhance Your Development Skills with the View Transition API

158
Followers
1
Following
308
Posts
06.11.2024
Joined
Posts Following

Latest posts by Bag of Tricks for View Transitions @vtbag.dev

If you like Adam's article, you might also want to have a look at vtbag.dev/vector-demo/ and fun-with-view-transitions.pages.dev/episode/7/page

07.03.2026 08:07 πŸ‘ 4 πŸ” 3 πŸ’¬ 0 πŸ“Œ 0
Preview
Tower of Hanoi A gloriously playful episode of Fun With View Transitions that pokes, prods, and plays with a demo stuffed with tips and tricks!

fun-with-view-transitions.pages.dev/episode/7/page
(set view transition type to "...with vectors")

07.03.2026 08:03 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
The Vector Demo A view transition tech demo were the old and new positions of morphing images control the trajectories.

vtbag.dev/vector-demo/

07.03.2026 08:03 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

So cool to see such a detailed behind-the-scenes look from someone whose work I really admire!

Here are two more demos with swooping transitions that use the image-pair pseudo for the composition instead of the approach described in the article above.

07.03.2026 08:03 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

MPA View Transitions FTW!

05.03.2026 09:30 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Surely there’s something we can do. πŸ™ƒ

04.03.2026 15:16 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Retain Control While Transitioning Normally, you cannot interact with a page while view transition animations are running. Here is why that happens, and how to fix it.

Surely there’s something we can do πŸ™ƒ

04.03.2026 14:07 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Scoped view transitions digits ...

Playing around with scoped view transitions on @codepen.io
codepen.io/g12n/pen/RNR...

22.02.2026 15:31 πŸ‘ 6 πŸ” 1 πŸ’¬ 0 πŸ“Œ 1
Blink: Intent to Ship: Element-scoped view transitions Blink: Intent to Ship: Element-scoped view transitions

Blink: Intent to Ship: Element-scoped view transitions

19.02.2026 13:02 πŸ‘ 18 πŸ” 4 πŸ’¬ 1 πŸ“Œ 1

If you want, you can delay the start of cross-document view transitions by blocking the renderer until the custom elements are defined.

Then the last frame you see is the previous page. After the renderer resumes, the next frame shows the loading page with defined custom elements.

15.02.2026 21:57 πŸ‘ 1 πŸ” 1 πŸ’¬ 1 πŸ“Œ 0

If you want, you can delay the start of cross-document view transitions by blocking the renderer until the custom elements are defined.

Then the last frame you see is the previous page. After the renderer resumes, the next frame shows the loading page with defined custom elements.

15.02.2026 21:57 πŸ‘ 1 πŸ” 1 πŸ’¬ 1 πŸ“Œ 0

What kind of regression did you encounter? It’s a bit tricky to make out from the video.

13.02.2026 09:55 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

I am genuinely confident that Firefox will soon support cross document view transitions. That will make an enormous difference to overall compatibility.

Then it will also soon be possible to detect forward and backward directions without the History or Navigation API.

12.02.2026 18:37 πŸ‘ 1 πŸ” 2 πŸ’¬ 0 πŸ“Œ 0

I am genuinely confident that Firefox will soon support cross document view transitions. That will make an enormous difference to overall compatibility.

Then it will also soon be possible to detect forward and backward directions without the History or Navigation API.

12.02.2026 18:37 πŸ‘ 1 πŸ” 2 πŸ’¬ 0 πŸ“Œ 0

Great article, especially for guiding people through their first steps. It clearly and simply covers everything that really matters.

Quick heads-up: some code blocks look a bit odd because parts of the formatting were rendered as code.

03.02.2026 07:21 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

If you have written experimental code that uses the provisional `contain: view-transition` syntax, now might be a good time to switch.

02.02.2026 14:31 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Test Your Browser's View Transition Capabilities Check what part of the View Transition API is supported by your browser

As always also covered in "test your own browser", which also includes the link to the most current spec draft.

02.02.2026 14:31 πŸ‘ 0 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0
Preview
View Transition JavaScript API How to interact with view transitions using JavaScript

View Transition API:

There is a new kid on the block! πŸŽ‰

Meet the new `view-transition-scope` property and discover how it helps you avoid name clashes with scoped view transitions.

It gives you a clean way to manage transition names and keeps nested transitions from stepping on each other.

02.02.2026 14:31 πŸ‘ 4 πŸ” 0 πŸ’¬ 1 πŸ“Œ 1

Looks really good, even includes the theme toggle πŸ˜‰

31.01.2026 21:30 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Astro's ClientRouter can persist elements and an carry them over to the new page.

26.01.2026 17:12 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

Cross-document view transitions for the win!

Firefox, come join the fun!

26.01.2026 12:31 πŸ‘ 3 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Make that :: a *:: to also kill element scoped view transitions.

22.01.2026 08:57 πŸ‘ 0 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
Ladies and Gentlemen, Start Your Engines! How to enable browser-native cross-document view transitions on your multi-page site.

Yep, respecting reduced motion preferences is exactly what a responsible web developer should do!

22.01.2026 08:51 πŸ‘ 2 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

Disabling view transitions can never be important!

22.01.2026 08:42 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0

So you came here even though YOU HATE VIEW TRANSITIONS? But no worries, I got you covered.

Probably the most compact way to disable view transitions globally:

::view-transition { display: none }.

Drop this into your user stylesheet and never be bothered by View Transition API animations again.

22.01.2026 08:30 πŸ‘ 1 πŸ” 0 πŸ’¬ 3 πŸ“Œ 0

Sounds great! If you want a helping hand, I would be more than happy to support!

21.01.2026 13:59 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0
Preview
The Element Crossing @vtbag/element-crossing allows you carry over state to the next page when using cross-document view transitions

There is also tooling that greatly simplifies state transfer across view transitions for media playback, CSS transitions, form content, scroll position, svg animations...

21.01.2026 13:01 πŸ‘ 2 πŸ” 0 πŸ’¬ 1 πŸ“Œ 1
Video thumbnail

View Transition Types are newly baseline! These make it easier to build transitions that are specific to particular situations.

Also, we have some new View Transition DevTools in Firefox 147…

19.01.2026 14:13 πŸ‘ 98 πŸ” 8 πŸ’¬ 2 πŸ“Œ 1

Sehr cool!

View transitions are always fun!

17.01.2026 13:51 πŸ‘ 1 πŸ” 0 πŸ’¬ 1 πŸ“Œ 0

View transitions are always fun!

14.01.2026 16:21 πŸ‘ 1 πŸ” 0 πŸ’¬ 0 πŸ“Œ 0