Files
www_projectmycelium_com/src/components/AnimatedSection.tsx
2025-10-24 02:17:33 +03:00

23 lines
539 B
TypeScript

import { motion } from 'framer-motion'
type AnimatedSectionProps = {
children: React.ReactNode
id?: string
className?: string
}
export function AnimatedSection({ children, id, className }: AnimatedSectionProps) {
return (
<motion.section
id={id}
className={className}
initial={{ opacity: 0, y: 40 }}
whileInView={{ opacity: 1, y: 0 }}
viewport={{ once: true, margin: '-25% 0px -20% 0px' }}
transition={{ duration: 0.5, ease: 'easeOut' }}
>
{children}
</motion.section>
)
}