This repository was archived by the owner on Jan 11, 2023. It is now read-only.
This repository was archived by the owner on Jan 11, 2023. It is now read-only.
Element transitions between pages #778
Closed
Description
Here is an interesting site demonstrating element transitions when navigating between pages. I thought it would be cool if sapper could do something like this natively with the animate
directive. So, for example:
index.html:
<div class="something">
<div id="amazing" animate:flip={{duration: 200, key: 'hello'}}>I'm here</div>
</div>
<style>
#id {
width: 100px;
height: 100px;
}
</style>
detail.html:
<div id="amazing" animate:flip={{duration: 200, key: 'hello'}}>Now I'm over here</div>
<style>
#id {
display: absolute;
top: 30px;
width: 200px;
height: 200px;
}
</style>
And between navigation, sapper would find the element with the same ID or key, and automatically apply a flip animation.
Metadata
Metadata
Assignees
Labels
No labels