I'm Dani Akash
I'm Dani Akash
View Transitions API
Making boring websites exciting!
View Transitions API
What does view transitions mean?
View transitions offer a way to animate the transition between different views in a web application.
- Debug Bear
const $box = document.getElementById("my-box");
const moveBox = () => {
$box.classList.toggle("translate-x-36");
};
function handleClick(e) {
if (!document.startViewTransition) {
return;
}
document.startViewTransition(() => moveBox());
}
.my-red-box {
view-transition-name: my-red-box;
}
Cross-document view transitions
Demo by Chrome TeamLet's walkthrough an actual project
@view-transition {
navigation: auto;
}
All pages should include this css line
All the tech used in this talk:
Github Repos
or find them all + my previous talks @ daniakash.com/speaking
Connect with me on:
I also run a newsletter to talk about science, tech & dev tools: daniakash.com/newsletter