Capítulo 250 de 988
_Part of the @remotion/gsap package.
export const MyComposition: React.FC = () => {
const scope = useGsapTimeline<HTMLDivElement>(({timeline, selector}) => {
timeline
.from(selector('[data-title]'), {
y: 40,
opacity: 0,
duration: 0.8,
ease: 'power3.out',
})
.to(selector('[data-badge]'), {
rotation: 360,
duration: 2,
ease: 'none',
});
});
return (
<AbsoluteFill ref={scope} style={{background: '#000', color: '#fff'}}>
<h1 data-title>Hello GSAP</h1>
<div data-badge style={{width: 60, height: 60, background: '#B8FF5A'}} />
</AbsoluteFill>
);
};