Files
www_projectmycelium_com/src/components/AnimatedSection.tsx
sasha-astiadi 3564b5cb0f feat: enhance homepage with smooth scroll navigation
- Added scroll-to-slider functionality when clicking "Get Started" button
- Modified AnimatedSection to support ref forwarding for scroll targeting
- Updated HomeAurora component to accept click handler prop
- Refined homepage hero text and description for clearer value proposition
- Changed button from link to click handler for better user interaction
2025-11-01 21:08:42 +01:00

27 lines
634 B
TypeScript

import { motion } from 'framer-motion'
import { forwardRef } from 'react'
type AnimatedSectionProps = {
children: React.ReactNode
id?: string
className?: string
}
export const AnimatedSection = forwardRef<HTMLElement, AnimatedSectionProps>(
({ children, id, className }, ref) => {
return (
<motion.section
ref={ref}
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>
)
},
)