Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/vtbag/website. The @vtbag website. ⭐️ Please star to support this work! ⭐️
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182---title: "The Bag of Tricks for View Transitions"description: "Tools, Tips, and Tricks to Enhance your Dev Skills with the View Transition API!"template: splashhero: tagline: "Tools, Tips, and Tricks to Enhance your Dev Skills with the View Transition API!" image: file: ../../assets/bag.png alt: The vtbag logo actions: - text: Open the Bag link: /vtbag/ icon: right-arrow variant: primary - text: Sister Site for Astro's Client Router link: https://events-3bg.pages.dev icon: external variant: secondaryhead: - tag: meta attrs: name: robots content: "index, follow" - tag: link attrs: rel: "alternate" type: "application/rss+xml" title: "The Bag of Tricks for View Transitions" href: "https://vtbag.dev/rss.xml" - tag: meta attrs: property: "og:type" content: "website" - tag: script attrs: type: "application/ld+json" content: '{"@context": "https://schema.org", "@type": "WebSite", "name": "@vtbag", "url": "https://vtbag.dev/"}' - tag: meta attrs: name: "google-site-verification" content: "pNNfJDGodQYwIF2MdCDzJ8SfxCvWHbr9ygW34zRA8Wk"renderBlocking: legal---
import Bsky from "@/components/Bsky.astro";import NoViewTransitions from "@/components/NoViewTransitions.astro";import ReducedMotion from "@/components/ReducedMotion.astro";import WebRing from "@/components/WebRing.astro";import { CardGrid, Card } from "@astrojs/starlight/components";import { Icon } from "@astrojs/starlight/components";
<NoViewTransitions /><ReducedMotion />
<script>{`document.querySelector(".tagline").innerHTML = "<strong>Tools</strong>, <strong>Tips</strong>, and <strong>Tricks</strong> to <strong>Enhance</strong> your <strong>Dev Skills</strong> with the <strong>View Transition API</strong>!"`}</script>
<style>{` :root { --sl-content-width: 80%; } div.hero { padding-top: 2vmin; } main .hero img { view-transition-name: logo; min-width: 300px; } aside.right-sidebar-container { display: none; } .hero h1 { text-align: left; font-size: var(--sl-text-h1); width: 8.25em; } .hero .actions .primary { border: none; background-color: var(--sl-color-accent-low, rgb(85, 45, 25)); color: var(--sl-color-accent); }
.right-sidebar-panel { display: none; } .smallCTA { font-size: 1.2rem; }`}</style>
<p class="smallCTA">Spark up a discussion on <a href="https://discord.gg/jUqfqJT5">the Bag's Discord</a> or on <span><b>🦋</b></span> Bluesky! Hit the <Bsky /> buttons to share your thoughts and please stay connected with <a target="_blank" href="https://bsky.app/profile/vtbag.dev">The Bag</a> and <a target="_blank" href="https://bsky.app/profile/martr.app">me</a> for all the latest!</p>
<CardGrid stagger><Card title="The Basics" icon="open-book">Everything you ever wanted to know about the View Transition API, in one place.Explore what your browser is capable of and what is new in the API specification.
Dive into examples and see what holds the world of pseudo elements and their styling together at its core.</Card><Card title="Tools & Libraries" icon="pen">As you dig deeper into View Transitions, you will quickly see how a little JavaScript here and there can unlock much more and make things even more fun.
You do not have to build everything yourself. The Bag provides battle tested libraries and tools that make working with View Transitions easier, more enjoyable, and practical for real projects.</Card><Card title="Fun with View Transitions" icon="pen">A journey told in episodes, starting with simple use cases and moving toward moreadvanced applications.
Along the way, it covers basic setup, image morphing,fixing broken text transitions, and extended same page examples.</Card><Card title="Tips & Tricks" icon="pen">What would a bag of tricks be without a few tips and tricks along the way? Everything here comes straight from real world practice, built for real world use.
I have stumbled through the rough edges, chased down the weird bugs, and made all the mistakes already, so you do not have to.</Card><Card title="Tech Demos" icon="pen">Last but not least, it is all about "show, don't tell". New techniques are always easier to grasp when you can see them in action instead of just reading about them.
The Tech Demos section at the end of the navigation links to all the examples, and there are, if I may say so with a bit of modesty, a few real gems in there.</Card></CardGrid>
<WebRing />
<div id="legal">Built with <Icon name="starlight" color="darkgoldenrod" label="The Starlight logo" /> [Starlight](https://starlight.astro.build).\Content on this site is licensed under a [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by-nc/4.0/)\Code samples are licensed under the ISC License with the exception of the /navigation-types/ demo, which originates from https://github.com/GoogleChromeLabs/view-transitions-toolkit and is licensed under the Apache License, Version 2.0.</div>
<style>{`
.smallCTA { max-width: 85%; margin-inline: auto; } p span b { view-transition-name: butterfly1; } p a span b { view-transition-name: butterfly2; }
#legal { border: 1px #888 dotted; border-radius: 8px; margin-inline: auto; padding: 0.5rem 1rem; width: fit-content;
p { max-width: 100%; width: fit-content; font-size: 0.8rem; } svg { display: inline; transform: translateY(2px) } }
::view-transition-new(butterfly1) { animation: 1s both ease-out butterfly1; } ::view-transition-new(butterfly2) { animation: 1s both ease-in butterfly2; } @keyframes butterfly1 { from { transform: translateX(100vw) } } @keyframes butterfly2 { from { transform: translateX(-100vw) } }
`}</style>