consolelog.tools logo

Scroll Animation Helper

Generate scroll-triggered animations for various libraries

Configuration

Percentage of element visible before triggering (0-1)

Adjust trigger area (top, right, bottom, left)

Generated Code

import { motion, useInView } from 'framer-motion';
import { useRef } from 'react';

export default function ScrollAnimatedComponent() {
  const ref = useRef(null);
  const isInView = useInView(ref, {
    once: true,
    amount: 0.3,
    
  });

  return (
    <motion.div
      ref={ref}
      initial={{"opacity":0,"transform":"translateY(50px)"}}
      animate={isInView ? {"opacity":1,"transform":"translateY(0)"} : {"opacity":0,"transform":"translateY(50px)"}}
      transition={{ duration: 0.6 }}
    >
      Your content here
    </motion.div>
  );
}

Animation Presets

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Frequently Asked Questions - Scroll Animation Helper