'use client'; import { useEffect, useRef, useState } from 'react'; import { motion, MotionValue, useScroll, useTransform } from 'motion/react'; import Image from 'next/image'; import { cn } from '@/utils/cn'; const features = [ { title: 'Boost visibility in Google', description: 'Reddit answers now rank high in Google search. Quality comments can drive traffic from both Reddit and search engines.', imageUrl: 'https://alignui.com/images/blocks/features-02.png', className: 'bg-orange-50 dark:border-orange-300 dark:bg-neutral-900', }, { title: 'Tap into Reddit as search', description: 'More people treat Reddit like a search engine. Strong comments put your brand in front of users actively looking for solutions.', imageUrl: 'https://alignui.com/images/blocks/features-02-mobile.png', className: 'bg-pink-50 dark:border-pink-300 dark:bg-neutral-900', }, { title: 'Long-lasting traffic', description: "Great Reddit comments don't fade. They get rediscovered, shared, and keep sending qualified readers to your profile over time.", imageUrl: 'https://alignui.com/images/blocks/features-02.png', className: 'bg-purple-50 dark:border-purple-300 dark:bg-neutral-900', }, ]; const stickyTop = 96; const stackOffset = 56; function useScrollAnimation() { const [inView, setInView] = useState(false); const ref = useRef(null); useEffect(() => { const element = ref.current; if (!element) return; const observer = new IntersectionObserver( ([entry]) => { setInView(entry.isIntersecting); }, { root: null, rootMargin: '0px', threshold: 0.1, }, ); observer.observe(element); return () => observer.disconnect(); }, []); return [ref, inView] as const; } function AnimatedHeader() { const [eyebrowRef, eyebrowInView] = useScrollAnimation(); const [titleRef, titleInView] = useScrollAnimation(); const [descriptionRef, descriptionInView] = useScrollAnimation(); return (

Reddit Marketing

Why Good Reddit Comments Matter

Generate long-lasting, qualified traffic with evergreen Reddit comments that continue to attract readers over time.

); } function StickyFeatureCard({ feature, index, progress, }: { feature: (typeof features)[number]; index: number; progress: MotionValue; }) { const targetScale = Math.max(0.78, 1 - (features.length - index - 1) * 0.08); const scale = useTransform(progress, [index * 0.24, 1], [1, targetScale]); return (
{String(index + 1).padStart(2, '0')}

{feature.title}

{feature.description}

{feature.title}
); } export default function StickyFeatureCards() { const containerRef = useRef(null); const { scrollYProgress } = useScroll({ target: containerRef, offset: ['start start', 'end end'], }); return (
{features.map((feature, index) => ( ))}
); }