From e0e655c575d0bbf5a90038ac0e951b730cc83a6a Mon Sep 17 00:00:00 2001 From: kudinDmitriyUp Date: Thu, 16 Apr 2026 06:00:29 +0000 Subject: [PATCH 1/3] Bob AI: Implement a 3D parallax effect on the feature cards in the ' --- .../sections/features/FeaturesRevealCards.tsx | 75 +++++++++++-------- src/hooks/useParallax.ts | 36 +++++++++ src/styles/animations.css | 9 +++ 3 files changed, 89 insertions(+), 31 deletions(-) create mode 100644 src/hooks/useParallax.ts diff --git a/src/components/sections/features/FeaturesRevealCards.tsx b/src/components/sections/features/FeaturesRevealCards.tsx index 128f215..c3773f2 100644 --- a/src/components/sections/features/FeaturesRevealCards.tsx +++ b/src/components/sections/features/FeaturesRevealCards.tsx @@ -1,9 +1,11 @@ import { motion } from "motion/react"; import { Info } from "lucide-react"; +import { useRef } from "react"; import TextAnimation from "@/components/ui/TextAnimation"; import ImageOrVideo from "@/components/ui/ImageOrVideo"; import GridOrCarousel from "@/components/ui/GridOrCarousel"; import Button from "@/components/ui/Button"; +import { useParallax } from "@/hooks/useParallax"; type FeatureItem = { title: string; @@ -19,6 +21,47 @@ interface FeaturesRevealCardsProps { items: FeatureItem[]; } +const ParallaxFeatureCard = ({ item, index }: { item: FeatureItem; index: number }) => { + const cardRef = useRef(null); + const transform = useParallax(cardRef, { maxRotate: 5 }); + + return ( +
+
+ + +
+
+
+ {index + 1} +
+
+ +
+
+
+ + + ); +}; + const FeaturesRevealCards = ({ tag, title, @@ -63,37 +106,7 @@ const FeaturesRevealCards = ({ > {items.map((item, index) => ( -
- - -
-
-
- {index + 1} -
-
- -
-
-
- -