parallax.tsx

src/components/parallax.tsx
'use client'
import { useRef, useState, useEffect, type ReactNode } from 'react'
import { motion, useScroll, useTransform } from 'framer-motion'
// Parallax speed presets (percentage of scroll to translate)
const PARALLAX_SPEEDS = {
slow: 15,
medium: 30,
fast: 50,
}
export type ParallaxSpeed = 'slow' | 'medium' | 'fast'
interface ParallaxProps {
children: ReactNode
speed?: ParallaxSpeed
className?: string
}

Showing the first 20 lines.

Get full code

Support

Talk to the developers of this project to learn more

We have been building professional websites for big clients for over 15 years. Gallop templates and blocks is our best foundation for SEO websites and web apps.

© 2026 Web Plant Media, LLC