Welcome to our site! Here, you'll find all the code you need.

Welcome to our site! Here, you'll find all the code you need.

Welcome to our site! Here, you'll find all the code you need.

Welcome to our site! Here, you'll find all the code you need.

Welcome to our site! Here, you'll find all the code you need.

Regardless of your experience level - beginner or expert, we provide tools to support your coding journey. Explore our tutorials, example programs, and assignments to embark on your expedition.

Regardless of your experience level - beginner or expert, we provide tools to support your coding journey. Explore our tutorials, example programs, and assignments to embark on your expedition.

Regardless of your experience level - beginner or expert, we provide tools to support your coding journey. Explore our tutorials, example programs, and assignments to embark on your expedition.

Regardless of your experience level - beginner or expert, we provide tools to support your coding journey. Explore our tutorials, example programs, and assignments to embark on your expedition.

Regardless of your experience level - beginner or expert, we provide tools to support your coding journey. Explore our tutorials, example programs, and assignments to embark on your expedition.

Get Your code

Get Your code

Get Your code

Get Your code

Get Your code

import type { ComponentType } from "react";

export function withClass(Component): ComponentType {
	return (props) => {
	props.className += " your-class-name"; // Remember to add a space
	return <Component {...props} />;
	};
}

How to add custom class to element

How to add custom class to element

How to add custom class to element

How to add custom class to element

How to add custom class to element


import type { ComponentType } from "react"
import { createRef, useEffect, useRef } from "react"
import { useScroll, useTransform, useSpring } from "framer-motion"

// Scrub through a Lottie animation by scrolling while it is in view
export function withScrolledProgressInView(Component): ComponentType {
    return (props: any) => {
        const ref = useRef(null)

        const { scrollYProgress } = useScroll({
            target: ref,
            offset: ["end", "start"],
            layoutEffect: false, // fix required for sticky elements
        })

        const animationSpeed = useSpring(scrollYProgress, {
            stiffness: 20,
            damping: 20,
            //mass: 3.7,
        })

        return (
            <div ref={ref} style={props.style}>
                <Component {...props} progress={animationSpeed} />
            </div>
        )
    }
}

//        const animationProgress = useTransform(scrollYProgress, {
//            easing: "easeInOut",
//            outputRange: [0, 1],
//        })

Lottie on page scroll

Lottie on page scroll

Lottie on page scroll

Lottie on page scroll

Lottie on page scroll