Blueprint Code
Premium page-load exploding cards and text scramble animation matching the layout of blueprintapps.io.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388
"use client";
import { useGSAP } from "@gsap/react";
import gsap from "gsap";
import Image from "next/image";
import { useEffect, useRef, useState } from "react";
gsap.registerPlugin(useGSAP);
// Custom Text Scramble Component
function ScrambleText({
text,
speed = 25,
delay = 0,
}: {
text: string;
speed?: number;
delay?: number;
}) {
const [displayText, setDisplayText] = useState("");
const chars =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$%&*";
useEffect(() => {
let timer: NodeJS.Timeout;
let frame = 0;
const finalLength = text.length;
const run = () => {
timer = setTimeout(() => {
let current = "";
for (let i = 0; i < finalLength; i++) {
if (i < frame / 3) {
current += text[i];
} else {
current += chars[Math.floor(Math.random() * chars.length)];
}
}
setDisplayText(current);
frame++;
if (frame / 3 < finalLength) {
run();
} else {
setDisplayText(text);
}
}, speed);
};
const delayTimer = setTimeout(run, delay);
return () => {
clearTimeout(timer);
clearTimeout(delayTimer);
};
}, [text, speed, delay]);
return <span>{displayText}</span>;
}
const talentData = [
{
id: 0,
img: "/Untitled design.png",
name: "Sarah Jenkins",
role: "iOS Tech Lead",
skills: ["Swift", "UIKit", "Combine", "Architecture"],
color: "#f1b333", // Gold
left: "6vw",
top: "14vh",
rot: -12,
},
{
id: 1,
img: "/Untitled design (1).png",
name: "Alex Rivera",
role: "Android Architect",
skills: ["Kotlin", "Compose", "Coroutines", "Dagger"],
color: "#0c9367", // Green
left: "4vw",
top: "44vh",
rot: 8,
},
{
id: 2,
img: "/Untitled design (2).png",
name: "Elena Rostova",
role: "SwiftUI Lead",
skills: ["SwiftUI", "CoreData", "Combine", "Metal"],
color: "#8b5cf6", // Purple
left: "7vw",
top: "74vh",
rot: -6,
},
{
id: 3,
img: "/Untitled design (3).png",
name: "Marcus Vance",
role: "Flutter Specialist",
skills: ["Dart", "Flutter", "BLoC", "Firebase"],
color: "#3b82f6", // Blue
left: "26vw",
top: "10vh",
rot: 6,
},
{
id: 4,
img: "/Untitled design (4).png",
name: "Siddharth Mehta",
role: "React Native Lead",
skills: ["TS", "React Native", "Redux", "JSI"],
color: "#c53b3a", // Red
left: "58vw",
top: "10vh",
rot: -8,
},
{
id: 5,
img: "/Untitled design (5).png",
name: "Chloe Dupont",
role: "KMP Engineer",
skills: ["Kotlin", "KMP", "Compose", "Ktor"],
color: "#eab308", // Yellow
left: "80vw",
top: "14vh",
rot: 10,
},
{
id: 6,
img: "/Untitled design (6).png",
name: "Liam O'Connor",
role: "iOS UI Specialist",
skills: ["Swift", "CoreAnimation", "Metal", "UI"],
color: "#06b6d4", // Cyan
left: "83vw",
top: "44vh",
rot: -10,
},
{
id: 7,
img: "/Untitled design (7).png",
name: "Sofia Giraldo",
role: "Mobile DevOps Lead",
skills: ["CI/CD", "Fastlane", "Actions", "Docker"],
color: "#ec4899", // Pink
left: "76vw",
top: "74vh",
rot: 12,
},
];
export default function BlueprintScatterPage() {
const containerRef = useRef<HTMLDivElement>(null);
const heroRef = useRef<HTMLDivElement>(null);
const floatingCardsRef = useRef<HTMLDivElement>(null);
const floatTimelineRef = useRef<gsap.core.Timeline | null>(null);
useGSAP(
() => {
// 1. Page Load Intro Animation Sequence
const introTl = gsap.timeline({
defaults: { ease: "power4.out" },
});
// Fade in hero titles
introTl
.fromTo(
".hero-tagline",
{ y: 20, opacity: 0 },
{ y: 0, opacity: 1, duration: 0.8 },
)
.fromTo(
".hero-title-scramble",
{ opacity: 0 },
{ opacity: 1, duration: 0.5 },
"-=0.6",
)
.fromTo(
".hero-subtitle",
{ y: 20, opacity: 0 },
{ y: 0, opacity: 1, duration: 0.8 },
"-=0.5",
)
.fromTo(
".hero-cta-btn",
{ y: 20, opacity: 0 },
{ y: 0, opacity: 1, duration: 0.8 },
"-=0.6",
);
// Exploding / Scattering Cards Animation:
// Cards start centered and stacked behind the hero text, then explode outwards.
introTl.fromTo(
".scatter-card",
{
x: (i, target) => {
const rect = target.getBoundingClientRect();
const targetCenterX = rect.left + rect.width / 2;
const screenCenterX = window.innerWidth / 2;
return screenCenterX - targetCenterX;
},
y: (i, target) => {
const rect = target.getBoundingClientRect();
const targetCenterY = rect.top + rect.height / 2;
const screenCenterY = window.innerHeight / 2;
return screenCenterY - targetCenterY;
},
scale: 0.2,
rotation: 0,
opacity: 0,
},
{
x: 0,
y: 0,
scale: 1,
rotation: (i) => talentData[i].rot,
opacity: 1,
duration: 1.8,
stagger: 0.06,
ease: "power4.out",
onComplete: () => {
// Trigger floating idle loop once scattered
startFloatingIdle();
},
},
"-=1.2",
);
// 2. Continuous Floating Idle Loop
function startFloatingIdle() {
floatTimelineRef.current = gsap.timeline({ repeat: -1 });
const cards = gsap.utils.toArray<HTMLElement>(".scatter-card");
cards.forEach((card, idx) => {
const offset = idx % 2 === 0 ? 1 : -1;
gsap.to(card, {
y: `+=${10 * offset}`,
x: `+=${5 * -offset}`,
rotation: `+=${1.5 * offset}`,
duration: 3 + idx * 0.4,
yoyo: true,
repeat: -1,
ease: "sine.inOut",
});
});
}
return () => {
if (floatTimelineRef.current) floatTimelineRef.current.kill();
};
},
{ scope: containerRef },
);
// Custom mouse-move/hover functions for cards
const handleCardEnter = (
e: React.MouseEvent<HTMLDivElement>,
color: string,
) => {
// Bring card to front and scale up
gsap.to(e.currentTarget, {
scale: 1.08,
borderColor: color,
boxShadow: `0 15px 35px ${color}20, 6px 6px 0px #2a2a2a`,
duration: 0.3,
overwrite: "auto",
});
// Highlight inner text/details
gsap.to(e.currentTarget.querySelector(".card-role-text"), {
color: color,
duration: 0.3,
});
};
const handleCardLeave = (e: React.MouseEvent<HTMLDivElement>) => {
// Reset layout properties
gsap.to(e.currentTarget, {
scale: 1,
borderColor: "#2a2a2a",
boxShadow: "4px 4px 0px #2a2a2a",
duration: 0.3,
overwrite: "auto",
});
gsap.to(e.currentTarget.querySelector(".card-role-text"), {
color: "#a1a1aa",
duration: 0.3,
});
};
return (
<div
className="relative h-screen w-screen bg-[#f2ece0] text-[#2a2a2a] overflow-hidden selection:bg-[#f1b333] selection:text-black"
ref={containerRef}
>
{/* Premium subtle grid background overlay */}
<div
className="absolute inset-0 dot-grid pointer-events-none z-0"
style={{ opacity: 0.25 }}
/>
{/* Navbar removed to prevent overlapping with cards */}
{/* 2. Hero Section (Exploding Cards Workspace) */}
<div
ref={heroRef}
className="h-screen w-full relative flex flex-col justify-center items-center overflow-hidden"
>
{/* Central Hero Text Area */}
<div className="absolute bottom-[4vh] md:bottom-[6vh] left-1/2 -translate-x-1/2 z-20 text-center w-full max-w-2xl px-6 pointer-events-none">
<span className="hero-tagline inline-block font-mono text-[9px] tracking-[0.2em] uppercase text-[#f1b333] font-black bg-[#2a2a2a] text-white px-3 py-1 rounded-full mb-4">
Vetted Mobile Engineers
</span>
<h1 className="hero-title-scramble font-serif font-black text-4xl md:text-6xl text-[#2a2a2a] leading-[1.05] tracking-tighter uppercase mb-4">
<ScrambleText text="Hire Mobile Devs" delay={600} />
<br />
<span className="text-[#f1b333]">
<ScrambleText text="Differently" delay={1200} />
</span>
</h1>
<p className="hero-subtitle font-mono text-[11px] md:text-xs text-[#2a2a2a]/70 max-w-lg mx-auto leading-relaxed mb-8 pointer-events-auto">
Engineers who own outcomes — CTO-screened with a ≤ 5% pass rate.
Ready to scale your product immediately.
</p>
<div className="hero-cta-btn inline-block pointer-events-auto">
<button
onClick={() =>
window.history.length > 1
? window.history.back()
: (window.location.href = "/")
}
className="brutalist-btn bg-[#2a2a2a] text-white hover:bg-black px-8 py-3.5 rounded-full font-mono text-[11px] font-bold uppercase border-2 border-[#2a2a2a] shadow-[4px_4px_0px_#f1b333] cursor-pointer transition-transform duration-150 active:translate-y-0.5"
>
← Back
</button>
</div>
</div>
{/* Floating cards container */}
<div
ref={floatingCardsRef}
className="absolute inset-0 w-full h-full pointer-events-none z-10"
>
{talentData.map((card, idx) => (
<div
key={card.id}
className={`scatter-card absolute w-[36vw] md:w-[13.5vw] aspect-[3/4] pointer-events-auto select-none rounded-3xl border-2 border-[#2a2a2a] bg-white p-3 shadow-[4px_4px_0px_#2a2a2a] cursor-pointer transition-shadow duration-200`}
style={{
left: card.left,
top: card.top,
zIndex: 10 + idx,
}}
onMouseEnter={(e) => handleCardEnter(e, card.color)}
onMouseLeave={handleCardLeave}
>
{/* Card Image Area */}
<div className="w-full h-[70%] bg-[#fcfbfa] border border-[#2a2a2a]/10 rounded-2xl overflow-hidden relative">
<Image
src={card.img}
alt={card.name}
fill
priority
unoptimized
className="object-cover"
/>
</div>
{/* Card Title Details */}
<div className="h-[30%] flex flex-col justify-end pt-2">
<h4 className="font-serif font-black text-xs md:text-sm text-[#2a2a2a] leading-none mb-1 truncate">
{card.name}
</h4>
<div className="flex justify-between items-center w-full">
<span className="card-role-text font-mono text-[8px] md:text-[9px] text-zinc-400 font-bold uppercase">
{card.role}
</span>
<span className="font-mono text-[7px] text-zinc-400/80">
[0{idx + 1}]
</span>
</div>
</div>
</div>
))}
</div>
</div>
</div>
);
}
⚙️ Setup & Integration Guide
How to install, import, and configure this animation in your project
Option A: Install via CLI (Recommended)
You can install this component directly into your project via the TweenLabs CLI. It automatically creates the file and configures dependencies:
Option B: Manual Installation
Follow these steps to integrate the component into your project manually:
Install Packages
First, install GSAP and its official React hook helper library (@gsap/react).
Add Required CSS Styles
Copy the styles from the Required CSS tab above, or open the styles.css file that was automatically downloaded with your component. Paste these classes into your global stylesheet (e.g. src/app/globals.css or similar).
Create Component File
Create a new file in your React or Next.js project (e.g. src/components/Blueprint.tsx) and paste the code from the Standalone React Component tab above. If no standalone tab is available, copy the full page file code and adjust the routing logic for your needs.
Import & Render
Import and render the component in your page or view layout:
import Blueprint from "@/components/Blueprint";
export default function Page() {
return (
<main className="min-h-screen p-8 bg-[#f5f5f5] flex items-center justify-center">
<Blueprint />
</main>
);
}Customization & Component Properties
🛠️ Customization & Component Properties (Props)
You can pass the following settings to configure the layout and animation details:
cards(Array): A list of card datasets with titles, tags, custom coordinates, and hover accents.