Profile banner
Profile picture

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 Client Router | https://events-3bg.pages.dev Tools, Info, Tips & Tricks Enhance Your Development Skills with the View Transition API

created November 6, 2024

97 followers 1 following 187 posts

view profile on Bluesky

Posts

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Thank you, happy if i can be helpful!

1/9/2025, 11:47:38 AM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

We all are craving ;-)

1/9/2025, 10:57:09 AM | 1 1 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Sorry if I have to dampen the good mood a bit, but the View Transition API has two levels, and the cited Level 2 is not part of Interop 2025.

1/9/2025, 10:39:12 AM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Yep, L1 is a good start. There are ways to extend that into cross-document view transitions, e.g. with Astro. Safari quickly followed up with L2. @firefox.com might prioritize other goals like the remaining interop 2025 features. But they know the whole community is craving MPA view transitions!

1/9/2025, 9:07:16 AM | 2 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

The wording may cause a bit of confusion. Officially it is called "CSS View Transitions". But Level 1 (as in Firefox now) only works with document.startViewTransition(). The JS-free @view-transition rule belongs to Level 2, which is not in Interop 2025. With luck, the wait will not be too long.

31/8/2025, 7:56:16 PM | 1 0 | View on Bluesky | view

Profile picture IntentToShip (@intenttoship.dev) reposted

Gecko: Intent to Ship: CSS View Transitions L1

28/8/2025, 8:25:00 PM | 29 9 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

What surprising experiences have you had with view transitions? Let’s keep the list going so others can benefit from your experiences and get some help along the way!

25/8/2025, 5:26:52 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

We have all had those moments when things just do not work, or at least not the way we expected. Do not let that get you down or scare you off. It should not feel this way, because view transitions are supposed to be always fun. I tucked a survival kit into the bag to keep frustration at bay!

25/8/2025, 5:24:18 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Thanks @bram.us for requesting this!

22/8/2025, 10:35:33 PM | 3 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

New in Chrome Canary: You can now access a currently active view transition from JavaScript without the need to monkey-patch document.startViewTransition(): Say hello to document.activeViewTransition [Does not yet work on arbitrary elements when used with scoped view transitions]

22/8/2025, 10:28:11 PM | 12 2 | View on Bluesky | view

Profile picture Chrome for Developers (@developer.chrome.com) reposted reply parent

And just like that, another feature graduates from Canary. We love to see it. 🎓

19/8/2025, 7:05:48 PM | 1 1 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

Now is the time to point your regular Chrome browser (>=139) at vtbag.dev/basics/test-...

15/8/2025, 10:47:47 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

In particular, the ability to split the UI into multiple independent view transitions will significantly enhance interactivity of view transitions. Looking forward to new demos!

15/8/2025, 10:17:10 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Hi Penny 👋, thanks for the good news! Clipping with scoped view transitions works like a charm, now even in regular Chrome!

15/8/2025, 10:17:10 PM | 2 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Step by step. Looking forward to view transitions!

13/8/2025, 9:02:02 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

10/8/2025, 2:38:03 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

That really made my day! I'm in that video! Forget five seconds of fame. I got six! From the creators of ‘Over the Top Animations’ comes pure, unfiltered glory. The page falls, the crowd gasps — see it at 0:49.

9/8/2025, 7:37:50 AM | 16 2 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

Just combed through the CSSWG drafts for the View Transition API again to check for recent changes and upcoming ideas. I jotted down what I found here:

6/8/2025, 10:59:08 PM | 2 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

Crafting same-document view transitions with those fancy view transition types? And dreaming of the day Firefox finally joins the party with Level 1 support? Good news, this’ll have you covered.

4/8/2025, 6:51:13 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Anything I can try to help with?

28/7/2025, 6:27:19 AM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

A huge heartfelt thank-you! I’m really glad if it’s been helpful! 🙌🏻

27/7/2025, 5:50:26 AM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Hi Duffeh! With CSS, looks like there are often multiple roads to Rome 😎

26/7/2025, 4:34:52 PM | 2 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

No worries, I was not trying to stab you! Just sharing some thoughts and what I have learned. 🤺👜✨😆

26/7/2025, 4:31:42 PM | 1 0 | View on Bluesky | view

Profile picture Kate Holterhoff, PhD (@kateholterhoff.com) reposted

“Native CSS transitions have quietly killed the strongest argument for client-side routing. Yet people keep building terrible apps instead of performant websites.” - @jono.id www.jonoalderson.com/conjecture/i...

26/7/2025, 11:41:22 AM | 15 5 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Yes, that is what people often say. But “minimally functional” can still turn into “mildly maddening” if you do not realize you might need to help the browser out with a few extra directives to handle render blocking on larger pages.

26/7/2025, 2:20:01 PM | 3 1 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

View transitions are always fun!

16/7/2025, 6:05:18 PM | 2 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

A lively, insightful article with great examples. One shows well how easily group animations can cross existing subtree boundaries in the DOM, while another features staggered animation.

16/7/2025, 6:03:35 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Hi Christian, toller Blog Post, das macht echt Spaß zu lesen!

16/7/2025, 5:50:11 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Good job @firefoxnightly.bsky.social! Really looking forward to view transitions in Firefox. For all curious about the test page: vtbag.dev/basics/test-page/

14/7/2025, 6:40:52 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

Just spotted: Firefox Nightly already supports view-transition-class from the Level 2 spec.

A test page that shows which features of the View Transition API your browser supports, here showing Firefox Nightly (142). It supports not only same-document view transitions but also the view-transition-class property that is specified in the Level 2 specification.
14/7/2025, 5:18:22 PM | 6 1 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

... And here we go! Welcome to Episode 7 of Fun With View Transitions! (link in the header of the demo) Enjoy your weekend with this super playful and aha‑filled, delightfully nerdy romp through a demo packed with tools, tips and tricks. Happy if you get some ideas and inspiration out of it!

11/7/2025, 7:38:46 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Haha, awesome how the animation really pops and jumps out at you!

9/7/2025, 3:10:34 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

This really jumps out at you!

9/7/2025, 3:07:55 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

I would like to watch the video, but unfortunately I am getting a "video not found" error message!?

7/7/2025, 11:34:09 AM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Yes, it’s a good 80% solution, and the remaining 20% won’t realize, because the navigation appears as usual to them.

4/7/2025, 12:52:37 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

No doubt that’s the correct order, regardless of what the other stuff is.

1/7/2025, 5:28:48 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

3/3 Not nearly as great as scoped view transitions, but scoping stuff with a view transition type keeps everything neatly grouped together and it makes it easier to keep different use cases from getting in each other's way. Just add the types you need to the view transition, and you are good to go.

29/6/2025, 9:44:36 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

2/3 e.g.: .active-view-transition-type(board-spin) { #board { view-transition-name: board } #board button { background: grey } &::view-transition-old(board) {animation-name: spin-out} &::view-transition-new(board) {animation-name: spin-in} } @keyframes spin-out {..} @keyframes spin-in {..}

29/6/2025, 9:44:36 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

1/3 Love this pattern for conceptional independent view transitions running on the same page: .active-view-transition-type(some-type) { /* set view transition names and classes */ /* style stuff disabled by view transitions as disabled */ /* style pseudo-elements */ } /* define @keyframes */

29/6/2025, 9:44:36 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

Pretty sure we are going to see same-document view transitions land in Firefox soon! Exciting times ahead! 👜✨

27/6/2025, 6:16:46 PM | 2 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

While we are waiting, why not have a little fun with the latest Firefox Nightly (142)? Most of the demos here already run pretty OK. Worth a spin!

27/6/2025, 4:16:20 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

It might be a good approach to limit view transitions when there’s a preference for reduced motion. Some frameworks do this in their view transition integration. However, the API itself does not. If that catches you by surprise, it’s often hard to notice as there’s no clear feedback in that case.

27/6/2025, 8:44:34 AM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Cool page!

26/6/2025, 10:47:13 AM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

Explore entertaining ways to toggle between dark and light themes using view transitions! ☀️🌙

25/6/2025, 4:32:40 PM | 1 1 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

25/6/2025, 4:11:53 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Cool stuff! View transitions are always fun! events-3bg.pages.dev/jotter/same-...

25/6/2025, 4:07:31 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

… or clip the new one. And of course, you can also use z-index to switch the order of the old and new pseudo-element within their view-transition-group.

25/6/2025, 5:26:16 AM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Lots of tips, tricks and examples at vtbag.dev ;-)

24/6/2025, 5:23:37 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

By default, the image of the new page is painted above the old one and covers it completely. So if it has a solid background, you have to shift it in or fade it in, otherwise you will only see the new image and nothing of the old page.

24/6/2025, 5:09:13 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

@keyframes out { … } @keyframes in { … }

24/6/2025, 5:01:15 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Yes, by default you get two pseudo-elements: ::view-transition-old(root) and ::view-transition-new(root). You can override their crossfade animation e.g. with css like this: ::view-transition-old(root){ animation-name: out; } ::view-transition-new(root){ animation-name: in; }

24/6/2025, 5:01:15 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Just keep in mind that the @view-transition rule might not be the only thing to add. You might also want to account for reduced motion and plan for a bit of render blocking where needed.

24/6/2025, 2:40:37 PM | 2 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

This is definitely a strong suggestion! It has a much simpler mental model than a client-side router. Cross-document view transitions simply animate navigation without the hassle of re-initializing JavaScript state after the transition.

24/6/2025, 2:40:37 PM | 2 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

One page. Clean HTML. Smart CSS. Just enough JavaScript. Right-click and choose View Source to see how it works.

23/6/2025, 5:23:47 AM | 0 0 | View on Bluesky | view

Profile picture Bramus (@bram.us) reposted

Psst, the slides of my @middlesbroughfe.co.uk talk are up on my blog! > This talk explores the wild side of View Transitions. We’ll combine them with Scroll-Driven Animations, trigger them automatically with MutationObserver, and even resurrect classic Internet Explorer’s Page Transitions. #MFE25

20/6/2025, 12:39:28 PM | 25 2 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

The test page has been updated accordingly! Go give it a spin! 🧪✨

17/6/2025, 12:41:27 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

You love the View Transition API and you know its pseudo-elements by heart: ::view-transition ::view-transition-group ::view-transition-image-pair ::view-transition-old ::view-transition-new But have you already heard of ::view-transition-group-children? Find further information on vtbag.dev

17/6/2025, 12:09:18 PM | 7 1 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

View Transitions are always fun!

13/6/2025, 10:32:15 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

You can work around it, but yes, +1!

12/6/2025, 12:41:00 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Or did you mean normal CSS transitions retriggering for no reason?

11/6/2025, 10:08:09 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Explicitly setting the view transition name of :root to none during the same-document view transition prevents this. The same issue can occur with two same-document view transitions on the same page if their view transition names are not properly scoped to their respective view transitions.

11/6/2025, 9:51:53 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

document.startViewTransition() and auto navigation with @view-transition both start view transitions on the entire document For e.g. if you define a slide animation on :root for cross-document view transitions it will also play when you start a same-document view transition for opening the dialog.

11/6/2025, 9:51:53 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

events-3bg.pages.dev/jotter/same-...

11/6/2025, 8:51:31 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

I like this incantation. :active-view-transition-type(lightbox) { *:not(dialog.lightbox *), & { view-transition-name: none !important; } } to temporarily switch off all other view transition names that might interfere with the lightbox.

11/6/2025, 8:50:52 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Yeah, mutual isolation of view transitions is a really interesting and sometimes challenging topic. Everything will fall into place once we have scoped view transitions, but until then, you have to handle it yourself. And that applies to the plain View Transition API too, not just Astro.

11/6/2025, 8:50:52 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Hey @duffeh.bsky.social 👋 Good article! Cool effect! Switching to the native API (even for cross-document view transitions) is the right way to go in 2025!

11/6/2025, 2:36:09 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

New for AstroJS View Transitions: Use instead of to make that link show the backwards animation when clicked and the forward animation on browser back! Demo: events-3bg.pages.dev/back-demo/ Description: events-3bg.pages.dev/library/Back...

10/6/2025, 6:35:01 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Haha, I get what you mean. But at least JavaScript lets you stick with your single view-transition-name approach for both forward and backward navigation. Are you using @view-transition with plain HTML or a framework?

8/6/2025, 1:33:22 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Hi @ikbensiep.lfo-industries.com 👋 Guarding view transition names with selectors like you did is mostly a clever approach. Are you looking for a JavaScript-free solution, or would you also consider JS-based approaches?

8/6/2025, 12:49:48 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Definitively! Same document view transition is part of Interop 2025 and Firefox Nightly already allows for a sneak preview. Safari was quick at the end of last year to add cross-document support after same-document view transitions. Would be great if Firefox could also add them soon after.

4/6/2025, 10:12:18 AM | 2 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

About a year ago, @fks.bsky.social wrote: "We will be updating our documentation over the next few weeks to include using these new native browser APIs." Now that also Firefox is actively working on the View Transition API, maybe it is time to finally add that information to the Astro docs?

4/6/2025, 9:45:09 AM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Also: The Astro.js ClientRouter was meant as a stopgap to enable cross-document transitions before native browser support was ready. Now widely supported by the View Transition API, you might consider switching to it to avoid the state and script issues that come from turning your MPA into a SPA.

4/6/2025, 8:43:56 AM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Glad you found a solution! There are actually a few more elements that survive the Astro.js swap(): events-3bg.pages.dev/jotter/astro...

4/6/2025, 8:43:56 AM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

I guess, an URL would have been nice. Here it is: events-3bg.pages.dev/jotter/same-... Can’t believe I missed that in the first post. I'm really sorry about that! Making up for it the only way I know how: with a fresh teaser drop from that article!

31/5/2025, 4:27:48 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

The Jotter has a new page about how to do same-document view transitions in Astro. Works fine in combination with cross-document view transitions and even with multiple use cases on the same page. Spoiler alarm: Most of it is not Astro-specific at all.

31/5/2025, 2:58:04 PM | 2 1 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

I’ve been exploring View Transitions a bit. So if you ever get stuck or curious, happy to share what I know.

31/5/2025, 2:50:56 PM | 3 0 | View on Bluesky | view

Profile picture Martin Trapp (@martr.app) reposted

Feeling honored: Bramus picked up an idea we chatted about, extended his blog, and even linked back to The Bag! That is one heck of a compliment coming from someone whose talks and demos around view transitions (and far beyond!) I truly admire. Huge thanks, @bram.us, that really made my day!

15/5/2025, 8:58:49 PM | 5 1 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

Bramus offers an amazing look behind the scenes of Maxi's famous demo! I cannot match that fantastic 3D effect, but if you want to see the individual pseudo-elements of your view transitions just as clearly, I have something for you. See that "Frame elements" checkbox in the controls on the right?

28/5/2025, 7:22:04 AM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

What Jim observed (cross-document view transitions work well when the page comes from back-forward cache but break on normal load) is a classical sign that you might want to take a closer look at (insufficient) render blocking.

23/5/2025, 6:58:14 AM | 2 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Firefox is rightly not included in the list, as it currently does not support cross-document view transitions. Same-document view transitions are actively being developed (part of Interop 2025), and their current state can already be explored in Firefox Nightly.

21/5/2025, 10:31:38 PM | 3 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

This is Firefox Nightly 140.0a1 (2025-05-21)

21/5/2025, 8:05:44 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

View Transition API (lvl 1) is enabled in Firefox Nightly bsky.app/profile/mart...

21/5/2025, 8:15:49 AM | 2 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Hi @foldster.bsky.social 👋 No, currently not. Cross-document view transitions only work when navigating between pages of same origin. See drafts.csswg.org/css-view-tra... (searching the spec for “same-origin” will yield some more matches)

20/5/2025, 10:17:20 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

That ripples effect at the end is really cool! ⚪🔘

19/5/2025, 5:11:51 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

🎉👜✨Tada! Just like I said!: vtbag.dev/vector-demo/ View transitions that crank up the drama the farther the element travels from its old spot to the new one.

15/5/2025, 2:17:37 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Yes, match-element works in both, but that falls short for cross-document transitions when names should match. I like that your ident() examples look cleaner than attr() with the explicitly type() cast. I share some notes on my current experiments here: vtbag.dev/tips/auto-na...

14/5/2025, 7:23:00 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

14/5/2025, 5:49:10 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

Whoohoo! There will be a CSS-native way to auto-assign view transition names (and more). I have coded auto-naming results of querySelectorAll so many times that I even published a reusable function for it: vtbag.dev/tools/utensi... Glad to see this will finally be possible with the standard.

14/5/2025, 5:48:09 PM | 2 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

Will soon post the demo where these lines were taken from!

13/5/2025, 5:43:31 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

Here you can try it live! Every click triggers a view transition. If you click quickly, the latest one would rudely interrupt the active one. mayStartViewTransition() from @vtbag/utensil-drawer helps here by queuing update callbacks and batching them into new view transitions.

13/5/2025, 9:59:48 AM | 2 1 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

⏱️ Time for another teaser! 🔗 Chained View Transitions Where starting a new transition won’t cancel the one already in progress, no matter how fast you slam that button 🖱️💥

12/5/2025, 3:06:38 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

Don’t just stick to the highlighted bit – the whole piece is a fun and rewarding read! View transitions are always fun!

6/5/2025, 9:57:17 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Oh yes, that really looks very similar! Thanks a lot!

1/5/2025, 6:36:40 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

Thank you! Guess it is not so much about right and wrong. The browsers are in the wild and sites have to deal with all of them, at least for some month. Gecko in Firefox nightly seems similar to WebKit with respect to viewport resizing but has other glitches :-)

1/5/2025, 3:17:20 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

A brand new episode from the Fun With View Transition series

1/5/2025, 12:21:47 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

It was so strange. Only on mobile, when opening a particular blog post, featuring some fancy component, the View Transition API stubbornly refused to start the animation. “This is so mysterious, it promises to be a lot of fun.” At that point, I did not yet know just how much fun was waiting for me.

1/5/2025, 12:21:47 PM | 7 3 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

🌫️🌫️ It has begun.🌫️🌫️ 🌫️🌫️ It is coming. 🌫️🌫️

26/4/2025, 5:34:03 PM | 4 2 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev) reply parent

"snapshot containing block" sounds complicate. Simply think "viewport - including dynamic browser menus on mobile". And yes, changing the orientation of a mobile is also a trigger.

11/4/2025, 1:55:44 PM | 0 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

Hi @ianbellomy.com Progress report on drag and drop view transitions! So far I’ve only tested this in Chromium, but I’m quite happy with the current state. Let me know if this aligns with what you had in mind. codepen.io/martrapp/pen...

11/4/2025, 1:45:02 PM | 1 0 | View on Bluesky | view

Profile picture Bag of Tricks for View Transitions (@vtbag.dev)

Worth keeping in mind while developing: View transitions cancel if the snapshot containing block changes size mid-flight, for example, when you resize the devtools while you paused the animations. Surprising? Maybe. But it is expected behavior, even if it feels a bit unexpected. 🤓

11/4/2025, 12:51:08 PM | 2 0 | View on Bluesky | view