⮌ back | Home

Use the buttons above to select an animation style. Then press the link in the demo web site below to see that animation in action. Use check checkbox to see how the clipped animation looks like. How do you do that?

Flip

Welcome to My Website

sample picture

This is the first page of a sample website.
For more information about the team, click here.

About Us

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed non risus. Suspendisse lectus tortor, dignissim sit amet, adipiscing nec, ultricies sed, dolor. Cras elementum ultrices diam. Maecenas ligula massa, varius a, semper congue, euismod non, mi.

Our Services

  • Web Development
  • App Development
  • Digital Marketing


How were these animations crafted?

All animations are made with Zoom, Swing and Move from the astro-vtbot package. In the code examples below you can see how they are parametrized.

By the way: The animation of the button grid at the top of this page was created by simply adding swing() to transition:animate.

---
import { swing } from "astro-vtbot/animations/swing";
---
<div transition:animate={swing()}>
...
</div>

Here are the codes for the other examples:

Zoom

Zoom1.astro
---
import { zoom } from "astro-vtbot/animations/zoom";
---
<div transition:animate={zoom({ duration: '0.3s' })}>
...
</div>

Zoom2.astro
---
import { customZoom } from "astro-vtbot/animations/zoom";
import AnimationStyle from "astro-vtbot/animations/AnimationStyle.astro";
const zoom2Scope = customZoom('zoom2', {
keyframes: { scale: { forwardOut: 0, backwardIn: 0 } },
});
---
<AnimationStyle name="zoom2">
<div data-astro-transition-scope={zoom2Scope}>
...
</div>

Zoom3.astro
---
import { customZoom } from "astro-vtbot/animations/zoom";
import AnimationStyle from "astro-vtbot/animations/AnimationStyle.astro";
const zoom3Scope = customZoom('zoom3', {
keyframes: { scale: { forwardOut: 0, backwardIn: 0 } },
base: { duration: '0.3s', easing: 'cubic-bezier(.16,.73,.05,1.52)' },
extensions: {
forwards: { new: { 'animation-delay': '0.2s' } },
backwards: { new: { 'animation-delay': '0.2s' } },
},
});
---
<AnimationStyle name="zoom3">
<div data-astro-transition-scope={zoom3Scope}>
...
</div>

Swing

Swing1.astro
---
import { customSwing } from "astro-vtbot/animations/swing";
import AnimationStyle from "astro-vtbot/animations/AnimationStyle.astro";
const swing1Scope = customSwing('swing1', {
keyframes: { axis: { y: 1 }, angle: { leave: '90deg', enter: '-90deg' } },
base: { duration: '300ms' },
extensions: {
forwards: {
old: { 'transform-origin': 'center left' },
new: { 'transform-origin': 'center right', 'animation-delay': '0.075s' },
},
backwards: {
old: { 'transform-origin': 'center right' },
new: { 'transform-origin': 'center left', 'animation-delay': '0.075s' },
},
},
});
---
<AnimationStyle name="swing1">
<div data-astro-transition-scope={swing1Scope}>
...
</div>

Swing2.astro
---
import { customSwing } from "astro-vtbot/animations/swing";
import AnimationStyle from "astro-vtbot/animations/AnimationStyle.astro";
const swing2Scope = customSwing('swing2', {
keyframes: {
axis: { z: 1 },
angle: { leave: '180deg', enter: '-180deg' },
},
base: { duration: '0.3s' },
extensions: {
forwards: { new: { 'animation-delay': '0.15s' } },
backwards: { new: { 'animation-delay': '0.15s' } },
},
});
---
<AnimationStyle name="swing2">
<div data-astro-transition-scope={swing2Scope}>
...
</div>

Swing3.astro
---
import { customSwing } from "astro-vtbot/animations/swing";
import AnimationStyle from "astro-vtbot/animations/AnimationStyle.astro";
const swing3Scope = customSwing('swing3', {
keyframes: { axis: { x: 1 } },
base: { duration: '0.3s' },
extensions: {
forwards: {
old: { 'transform-origin': 'top center' },
new: { 'transform-origin': 'top center', 'animation-delay': '0.1s' },
},
backwards: {
old: { 'transform-origin': 'top center' },
new: { 'transform-origin': 'top center', 'animation-delay': '0.1s' },
},
},
});
---
<AnimationStyle name="swing3">
<div data-astro-transition-scope={swing3Scope}>
...
</div>

Move

Move1.astro
---
import { move } from "astro-vtbot/animations/move";
---
<div transition:animate={move()}>
...
</div>

Move2.astro
---
import { customMove } from "astro-vtbot/animations/move";
import AnimationStyle from "astro-vtbot/animations/AnimationStyle.astro";
const move2Scope = customMove('move2', {
keyframes: {
enter: { x: '100vw'},
leave: { x: '-100vw'},
},
base: { duration: '0.5s', easing: 'linear' },
});
---
<AnimationStyle name="move2">
<div data-astro-transition-scope={move2Scope}>
...
</div>

Move3.astro
---
import { customMove } from "astro-vtbot/animations/move";
import AnimationStyle from "astro-vtbot/animations/AnimationStyle.astro";
const move3Scope = customMove('move3', {
keyframes: {
enter: { y: '-50cm', z: '-50cm' },
enterMid: { y: '10cm', z: '-25cm', angel: '10deg' },
leaveMid: { y: '-10cm', z: '-25cm', angel: '-10deg' },
leave: { y: '50cm', z: '50cm' },
axis: { x: 1, y: 1, z: 1 }
}
});
---
<AnimationStyle name="move3">
<div data-astro-transition-scope={move3Scope}>
...
</div>