sitcod3 commited on
Commit
e753bcf
·
verified ·
1 Parent(s): 4e65e3f

Upload src/components/GeometricBackground.tsx with huggingface_hub

Browse files
src/components/GeometricBackground.tsx ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import { motion } from "motion/react";
2
+ import { useEffect, useState } from "react";
3
+
4
+ export default function GeometricBackground() {
5
+ const [mounted, setMounted] = useState(false);
6
+
7
+ useEffect(() => {
8
+ setMounted(true);
9
+ }, []);
10
+
11
+ if (!mounted) return null;
12
+
13
+ return (
14
+ <div className="fixed inset-0 z-[-1] overflow-hidden pointer-events-none">
15
+ {/* Soft overlay gradient */}
16
+ <div className="absolute inset-0 bg-[radial-gradient(ellipse_at_top_right,_var(--tw-gradient-stops))] from-indigo-900/10 via-transparent to-transparent"></div>
17
+
18
+ {/* Floating geometric elements */}
19
+ <motion.div
20
+ className="absolute top-[10%] left-[15%] w-64 h-64 rounded-full border border-white/5"
21
+ animate={{
22
+ y: [0, -30, 0],
23
+ x: [0, 20, 0],
24
+ rotate: [0, 90, 0],
25
+ }}
26
+ transition={{
27
+ duration: 20,
28
+ repeat: Infinity,
29
+ ease: "linear",
30
+ }}
31
+ />
32
+ <motion.div
33
+ className="absolute bottom-[20%] right-[10%] w-96 h-96 rounded-full border border-indigo-500/10"
34
+ animate={{
35
+ y: [0, 40, 0],
36
+ x: [0, -30, 0],
37
+ scale: [1, 1.1, 1],
38
+ }}
39
+ transition={{
40
+ duration: 25,
41
+ repeat: Infinity,
42
+ ease: "easeInOut",
43
+ }}
44
+ />
45
+ <motion.div
46
+ className="absolute top-[40%] right-[30%] w-32 h-32 rotate-45 border border-sky-500/10"
47
+ animate={{
48
+ rotate: [45, 225],
49
+ y: [0, -50, 0],
50
+ }}
51
+ transition={{
52
+ duration: 30,
53
+ repeat: Infinity,
54
+ ease: "linear",
55
+ }}
56
+ />
57
+
58
+ {/* Grid pattern overlay */}
59
+ <div className="absolute inset-0 bg-[linear-gradient(rgba(255,255,255,0.02)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,0.02)_1px,transparent_1px)] bg-[size:4rem_4rem] [mask-image:radial-gradient(ellipse_60%_60%_at_50%_50%,#000_20%,transparent_100%)]"></div>
60
+ </div>
61
+ );
62
+ }