1.0.22 • Published 1 year ago
react-gsap-debugging v1.0.22
Installation
A simple React Gsap debugging component for your gsap.timeline
debugging.
npm install react-gsap-debugging
yarn add react-gsap-debugging
Usage
Add GsapDebugging
component to your app and pass timeline
as a prop.
Basic Example
import React, { useRef, useEffect, useState } from "react";
import { gsap } from "gsap";
import { GsapDebugging } from "react-gsap-debugging/dist/gsap-debugging";
export default function App () {
const el = useRef();
const q = gsap.utils.selector(el);
const [tl, setTl] = useState();
useEffect(() => {
const timeline = gsap.timeline()
.to(q(".box"), {
rotate: 360
})
.to(q(".circle"), {
x: 100
});
setTl(timeline);
}, []);
return (
<div className="app" ref={el}>
<div className={'box'}>Box</div>
<div className={'circle'}>Circle</div>
<GsapDebugging timeline={tl} />
</div>
);
}
API
This a list of props that you can pass down to the component:
Property | Description | Required | type |
---|---|---|---|
timeline | Timeline of gsap - gsap.timeline() variable | Yes | core.Timeline |
1.0.19
1 year ago
1.0.18
1 year ago
1.0.17
1 year ago
1.0.16
1 year ago
1.0.22
1 year ago
1.0.21
1 year ago
1.0.20
1 year ago
1.0.11
1 year ago
1.0.10
1 year ago
1.0.15
1 year ago
1.0.14
1 year ago
1.0.13
1 year ago
1.0.12
1 year ago
1.0.9
1 year ago
1.0.8
1 year ago
1.0.7
1 year ago
1.0.6
1 year ago
1.0.5
1 year ago
1.0.4
1 year ago
1.0.3
1 year ago
1.0.2
1 year ago
1.0.1
1 year ago
1.0.0
1 year ago