Skip to content

Commit 4b1009f

Browse files
committed
added new layout bg
1 parent 1e0b13b commit 4b1009f

File tree

6 files changed

+82
-3
lines changed

6 files changed

+82
-3
lines changed

app/components/hero.jsx

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
"use client";
2+
import { useEffect, useRef } from "react";
3+
import { gsap } from "gsap";
4+
5+
export default function Hero() {
6+
const cardsRef = useRef([]);
7+
8+
useEffect(() => {
9+
const tl = gsap.timeline({ repeat: -1, yoyo: true, defaults: { ease: "power1.inOut", duration: 1 } });
10+
tl.to(cardsRef.current, {
11+
stagger: 0.2,
12+
y: (i) => -20 - i * 10,
13+
x: (i) => (i - 1.5) * 40,
14+
rotation: (i) => (i - 1.5) * 5,
15+
}).to(cardsRef.current, { delay: 1, y: 0, x: 0, rotation: 0, stagger: 0.2 });
16+
}, []);
17+
18+
return (
19+
<section className="flex justify-center items-center py-12 px-6">
20+
<div className="max-w-6xl w-full bg-white rounded-xl shadow-lg flex flex-col md:flex-row items-center overflow-hidden">
21+
{/* Left: Heading and CTA */}
22+
<div className="w-full md:w-1/2 p-8 md:px-14 md:py-24 flex flex-col justify-center items-start">
23+
<h1 className="text-4xl md:text-4xl font-semibold text-neutral-900 mb-4">
24+
Build Fast with Stream<span className="px-2 py-2 bg-black text-white rounded-lg">UI</span>
25+
</h1>
26+
<p className="text-neutral-600 dark:text-neutral-400 text-lg mb-6">
27+
Copy-paste clean, ready-to-use React + Tailwind components into your projects without installation.
28+
</p>
29+
<div className="flex gap-4">
30+
<a
31+
href="#components"
32+
className="bg-black shadow-xl text-white px-5 py-3 rounded-lg hover:bg-neutral-800 transition"
33+
>
34+
Browse Components
35+
</a>
36+
<a
37+
href="#features"
38+
className="border shadow-xl border-neutral-700 text-neutral-900 px-5 py-3 rounded-lg hover:bg-neutral-100 transition"
39+
>
40+
Learn More
41+
</a>
42+
</div>
43+
{/* Reviewed by */}
44+
<div className="flex items-center gap-2 mt-6">
45+
<div className="flex -space-x-3">
46+
<div className="w-8 h-8 rounded-full bg-blue-600 flex items-center justify-center text-white text-sm font-medium">S</div>
47+
<div className="w-8 h-8 rounded-full bg-orange-600 flex items-center justify-center text-white text-sm font-medium">N</div>
48+
<div className="w-8 h-8 rounded-full bg-pink-600 flex items-center justify-center text-white text-sm font-medium">R</div>
49+
<div className="w-8 h-8 rounded-full bg-green-600 flex items-center justify-center text-white text-sm font-medium">V</div>
50+
</div>
51+
<span className="text-sm text-neutral-500">Reviewed by 100+ users</span>
52+
</div>
53+
</div>
54+
{/* Right: Animated Cards */}
55+
<div className="w-full md:w-1/2 p-8 flex justify-center items-center relative h-72">
56+
{[...Array(4)].map((_, i) => (
57+
<div
58+
key={i}
59+
ref={(el) => (cardsRef.current[i] = el)}
60+
className="absolute w-40 h-60 bg-neutral-100 rounded-lg shadow-md"
61+
/>
62+
))}
63+
</div>
64+
</div>
65+
</section>
66+
);
67+
}

app/components/navbar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const social = [
1515

1616
const Navbar = () => {
1717
return (
18-
<header className="w-full max-w-6xl mx-auto mt-4 rounded-2xl border border-neutral-200 bg-white shadow-md backdrop-blur">
18+
<header className="w-full max-w-6xl mx-auto mt-4 mb-4 rounded-2xl border border-neutral-200 bg-white shadow-md backdrop-blur">
1919
<div className="px-10 flex items-center justify-between py-3">
2020
{/* Logo */}
2121
<div className="text-2xl font-medium text-neutral-900">

app/page.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
import Navbar from "@/app/components/navbar.jsx";
1+
import Navbar from "@/app/components/navbar";
2+
import Hero from "@/app/components/hero";
23

34
export default function App() {
45
return (
56
<>
6-
<div>
7+
<div className="border-l border-r border-dashed border-neutral-400 p-2 md:p-2 mx-12">
78
<Navbar/>
89
</div>
10+
<div className="border-t border-l border-r border-dashed border-neutral-400 p-1 md:p-1 mx-12">
11+
<Hero/>
12+
</div>
913
</>
1014
);
1115
}

package-lock.json

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"lint": "next lint"
1010
},
1111
"dependencies": {
12+
"gsap": "^3.13.0",
1213
"next": "15.3.5",
1314
"react": "^19.0.0",
1415
"react-dom": "^19.0.0",

public/drop.png

30 KB
Loading

0 commit comments

Comments
 (0)