xxxxxxxxxx
import { gsap } from "gsap";
export function animate(node, { type, args }) {
let method = gsap[type];
return method(node, args);
}
xxxxxxxxxx
<script>
import { gsap } from "gsap";
import { onMount } from "svelte";
onMount(() => {
gsap.from(".blue", {color: "#8c0", duration: 1});
});
</script>
<main>
<div class="blue"></div>
</main>
<style>
.blue {
width: 100px;
height: 100px;
color: blue;
background-color: currentColor;
}
</style>