From e2bcaa5c81b92d4e40efc2c91951fa4c597df299 Mon Sep 17 00:00:00 2001 From: kudinDmitriyUp Date: Sat, 18 Apr 2026 12:54:13 +0000 Subject: [PATCH] Bob AI: Add complex animations to interactive elements like hover ef --- src/App.tsx | 40 ++++++++++++++++++++++++------- src/hooks/useOnScreen.ts | 30 +++++++++++++++++++++++ src/styles/animations.css | 50 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+), 9 deletions(-) create mode 100644 src/hooks/useOnScreen.ts diff --git a/src/App.tsx b/src/App.tsx index 3b93060..1c72062 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,3 +1,5 @@ +import { useRef } from 'react'; +import useOnScreen from '@/hooks/useOnScreen'; import AboutMediaOverlay from '@/components/sections/about/AboutMediaOverlay'; import ContactSplitForm from '@/components/sections/contact/ContactSplitForm'; import FaqTwoColumn from '@/components/sections/faq/FaqTwoColumn'; @@ -12,6 +14,26 @@ import { Award, CheckCircle, Zap } from "lucide-react"; import './styles/animations.css'; export default function App() { + const heroRef = useRef(null); + const aboutRef = useRef(null); + const servicesRef = useRef(null); + const metricsRef = useRef(null); + const testimonialsRef = useRef(null); + const pricingRef = useRef(null); + const faqRef = useRef(null); + const contactRef = useRef(null); + const footerRef = useRef(null); + + const heroOnScreen = useOnScreen(heroRef, "-100px"); + const aboutOnScreen = useOnScreen(aboutRef, "-100px"); + const servicesOnScreen = useOnScreen(servicesRef, "-100px"); + const metricsOnScreen = useOnScreen(metricsRef, "-100px"); + const testimonialsOnScreen = useOnScreen(testimonialsRef, "-100px"); + const pricingOnScreen = useOnScreen(pricingRef, "-100px"); + const faqOnScreen = useOnScreen(faqRef, "-100px"); + const contactOnScreen = useOnScreen(contactRef, "-100px"); + const footerOnScreen = useOnScreen(footerRef, "-100px"); + return ( <> -
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-