BSJ2004 commited on
Commit
a5ad6eb
·
verified ·
1 Parent(s): d0ed9a6

Upload components/InteractiveDemo.jsx with huggingface_hub

Browse files
Files changed (1) hide show
  1. components/InteractiveDemo.jsx +155 -0
components/InteractiveDemo.jsx ADDED
@@ -0,0 +1,155 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { motion } from 'framer-motion';
2
+ import { MousePointer2, Move3D, Touch, Play } from 'lucide-react';
3
+
4
+ export default function InteractiveDemo() {
5
+ return (
6
+ <section id="demo" className="py-24 bg-slate-900 relative overflow-hidden">
7
+ {/* Background Elements */}
8
+ <div className="absolute inset-0 overflow-hidden">
9
+ <div className="absolute top-[20%] left-[10%] w-[50%] h-[50%] rounded-full bg-blue-600/10 blur-[100px]"></div>
10
+ <div className="absolute bottom-[20%] right-[10%] w-[40%] h-[40%] rounded-full bg-purple-600/10 blur-[80px]"></div>
11
+ </div>
12
+
13
+ <div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 relative z-10">
14
+ <div className="grid grid-cols-1 lg:grid-cols-2 gap-16 items-center">
15
+ <div>
16
+ <motion.div
17
+ className="inline-block mb-6 px-4 py-2 rounded-full bg-slate-800/50 border border-slate-700 backdrop-blur-sm"
18
+ initial={{ opacity: 0, x: -40 }}
19
+ whileInView={{ opacity: 1, x: 0 }}
20
+ viewport={{ once: true }}
21
+ >
22
+ <span className="text-purple-400 font-medium text-sm">Interactive Experience</span>
23
+ </motion.div>
24
+
25
+ <motion.h2
26
+ className="text-4xl md:text-5xl font-bold text-white mb-8"
27
+ initial={{ opacity: 0, x: -40 }}
28
+ whileInView={{ opacity: 1, x: 0 }}
29
+ viewport={{ once: true }}
30
+ >
31
+ Experience the <span className="text-transparent bg-clip-text bg-gradient-to-r from-purple-400 to-cyan-400">Future</span> of Interaction
32
+ </motion.h2>
33
+
34
+ <motion.p
35
+ className="text-xl text-slate-400 mb-8"
36
+ initial={{ opacity: 0, x: -40 }}
37
+ whileInView={{ opacity: 1, x: 0 }}
38
+ viewport={{ once: true }}
39
+ transition={{ delay: 0.2 }}
40
+ >
41
+ Our AI-powered 3D scrolling technology transforms how users interact with your content.
42
+ Simply scroll to discover an immersive journey that feels incredibly natural and intuitive.
43
+ </motion.p>
44
+
45
+ <motion.div
46
+ className="space-y-6"
47
+ initial={{ opacity: 0, x: -40 }}
48
+ whileInView={{ opacity: 1, x: 0 }}
49
+ viewport={{ once: true }}
50
+ transition={{ delay: 0.4 }}
51
+ >
52
+ {[
53
+ { icon: <MousePointer2 className="w-6 h-6 text-cyan-400" />, text: "Intuitive mouse tracking for 3D depth" },
54
+ { icon: <Move3D className="w-6 h-6 text-purple-400" />, text: "Seamless parallax effects on scroll" },
55
+ { icon: <Touch className="w-6 h-6 text-blue-400" />, text: "Touch-optimized for mobile devices" }
56
+ ].map((item, index) => (
57
+ <div key={index} className="flex items-center gap-4 p-4 rounded-xl bg-slate-800/30 border border-slate-700">
58
+ <div className="w-12 h-12 rounded-xl bg-slate-900/50 flex items-center justify-center">
59
+ {item.icon}
60
+ </div>
61
+ <span className="text-slate-300">{item.text}</span>
62
+ </div>
63
+ ))}
64
+ </motion.div>
65
+ </div>
66
+
67
+ <motion.div
68
+ className="relative"
69
+ initial={{ opacity: 0, scale: 0.9 }}
70
+ whileInView={{ opacity: 1, scale: 1 }}
71
+ viewport={{ once: true }}
72
+ transition={{ delay: 0.3 }}
73
+ >
74
+ <div className="aspect-video rounded-2xl overflow-hidden bg-gradient-to-br from-slate-800 to-slate-900 border border-slate-700 relative group">
75
+ {/* Simulated 3D Scene */}
76
+ <div className="absolute inset-0 flex items-center justify-center overflow-hidden">
77
+ <div className="absolute inset-0 bg-[radial-gradient(circle_at_center,_var(--tw-gradient-stops))] from-slate-700/20 to-transparent"></div>
78
+
79
+ {/* Floating Elements */}
80
+ <motion.div
81
+ className="absolute w-32 h-32 bg-purple-500/30 rounded-full blur-2xl"
82
+ animate={{
83
+ y: [0, -30, 0],
84
+ x: [0, 20, 0],
85
+ scale: [1, 1.1, 1]
86
+
87
+ transition={{ duration: 6, repeat: Infinity }}
88
+ />
89
+
90
+ <motion.div
91
+ className="absolute w-48 h-48 bg-blue-500/20 rounded-full blur-3xl"
92
+ animate={{
93
+ y: [0, 40, 0],
94
+ x: [0, -30, 0],
95
+ scale: [1, 1.2, 1]
96
+
97
+ transition={{ duration: 8, repeat: Infinity, delay: 1 }}
98
+ />
99
+
100
+ <motion.div
101
+ className="absolute w-24 h-24 bg-cyan-500/30 rounded-full blur-xl"
102
+ animate={{
103
+ y: [0, -20, 0],
104
+ x: [0, -15, 0],
105
+ scale: [1, 1.1, 1]
106
+
107
+ transition={{ duration: 7, repeat: Infinity, delay: 2 }}
108
+ />
109
+
110
+ {/* Center Content */}
111
+ <div className="relative z-10 text-center p-8">
112
+ <div className="w-24 h-24 mx-auto mb-6 bg-gradient-to-br from-blue-500 to-purple-600 rounded-2xl flex items-center justify-center shadow-2xl shadow-purple-500/30 group-hover:scale-110 transition-transform duration-300">
113
+ <Play className="w-10 h-10 text-white ml-1" />
114
+ </div>
115
+ <h3 className="text-2xl font-bold text-white mb-2">Interactive Preview</h3>
116
+ <p className="text-slate-400">Hover and scroll to experience 3D depth</p>
117
+
118
+ {/* Floating Particles */}
119
+ {[...Array(6)].map((_, i) => (
120
+ <motion.div
121
+ key={i}
122
+ className="absolute w-2 h-2 bg-white rounded-full"
123
+ initial={{ opacity: 0 }}
124
+ animate={{
125
+ opacity: [0, 1, 0],
126
+ x: Math.random() * 200 - 100,
127
+ y: Math.random() * 200 - 100
128
+
129
+ transition={{
130
+ duration: 3,
131
+ repeat: Infinity,
132
+ delay: Math.random() * 2
133
+
134
+ />
135
+ ))}
136
+ </div>
137
+ </div>
138
+
139
+ <div className="absolute inset-0 bg-gradient-to-t from-slate-900/90 to-transparent opacity-0 group-hover:opacity-100 transition-opacity duration-300 flex items-end justify-center p-6">
140
+ <button className="bg-gradient-to-r from-blue-600 to-purple-600 text-white px-6 py-3 rounded-xl font-medium flex items-center gap-2">
141
+ <Play className="w-4 h-4" />
142
+ View Full Demo
143
+ </button>
144
+ </div>
145
+ </div>
146
+
147
+ {/* Decorative Elements */}
148
+ <div className="absolute -top-6 -right-6 w-24 h-24 bg-gradient-to-br from-purple-500 to-blue-500 rounded-full blur-2xl opacity-30 animate-pulse"></div>
149
+ <div className="absolute -bottom-6 -left-6 w-32 h-32 bg-gradient-to-br from-cyan-500 to-emerald-500 rounded-full blur-2xl opacity-20 animate-pulse" style={{ animationDelay: '1s' }}></div>
150
+ </motion.div>
151
+ </div>
152
+ </div>
153
+ </section>
154
+ );
155
+ }