1.0.1 • Published 4 years ago

@liqvid/gsap v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@liqvid/gsap

This module provides GSAP integration for Liqvid.

Installation

$ npm install @liqvid/gsap

Usage

See the GSAP docs and especially the React section.

import {useTimeline} from "@liqvid/gsap";
import {useEffect} from "react";

export function Demo() {
  const tl = useTimeline();
  
  useEffect(() => {
    tl.to(".box", {duration: 3, x: 800});
    tl.to(".box", {duration: 3, rotation: 360, y: 500});
    tl.to(".box", {duration: 3, x: 0});
  }, []);
  
  return (
    <section>
      <div className="box orange"></div>
      <div className="box grey"></div>
      <div className="box green"></div>
    </section>
  );
}