These rules define how to create a modern 3D landing page with Webflow-like aesthetics using React, TypeScript, Tailwind CSS, and open-source 3D libraries such as Three.js, React Three Fiber, and Spline alternatives.
- React + TypeScript (strict mode).
- React Three Fiber (r3f) for Three.js integration.
- @react-three/drei for helpers, controls, and loaders.
- Framer Motion for UI/UX animations & transitions.
- Tailwind CSS for responsive layout and styling.
- shadcn/ui for UI components (navigation, buttons, forms).
- Radix UI primitives when needed.
- react-query for data fetching (if APIs are needed).
- sonner or react-hot-toast for notifications.
src/pages/β All main page layouts.src/components/β UI components (Hero, Navbar, Footer, CTA).src/components/3d/β 3D scene components (CanvasWrapper, HeroScene, Models).src/assets/models/β GLTF/GLB models and textures.src/hooks/β Custom hooks (e.g., useResponsive3D, useAnimations).src/styles/β Tailwind configurations and global styles.
- Use React Three Fiber for all 3D rendering.
- Use drei helpers (OrbitControls, Environment, Text, ContactShadows).
- Optimize 3D models before adding (Blender, glTF compression).
- Always wrap the 3D scene inside a
CanvasWrapperwith lazy loading + suspense. - Use Framer Motion for UI overlays and transitions.
- Keep animations smooth (60fps target, GPU accelerated).
- Favor lightweight materials & baked lighting for performance.
- Use responsive scaling for 3D objects across devices.
- Consider scroll-based animations using
react-scrollorframer-motion.
- Hero Section β Fullscreen 3D canvas with a call-to-action overlay.
- Navigation β Sticky navbar with smooth scroll + animated underline.
- Sections β Use gradient backgrounds + glassmorphism cards.
- Typography β Modern sans-serif with Tailwind presets.
- Animations β Subtle parallax, hover effects, microinteractions.
- Dark Mode β Ensure 3D scenes + UI adapt to dark/light themes.
- Responsiveness β Test across mobile, tablet, and desktop.
- Use GLTF/GLB optimized models only.
- Use
useMemoanduseFramewisely for animations. - Leverage
drei/PerformanceMonitorfor adaptive quality. - Enable lazy loading for 3D models & textures.
- Compress assets (images β WebP/AVIF, models β Draco/Basis).
- Run Lighthouse CI for performance audits.
- Deploy via Vercel/Netlify with CDN asset hosting.
- Preload critical assets but lazy load non-essentials.
- Ensure PWA support (manifest.json, service worker).
- Add SEO meta tags and Open Graph tags.
CanvasWrapper+HeroSceneinsrc/components/3d/.- Navbar, Hero, Features, CTA, Footer inside
src/pages/Index.tsx. - Use r3f + drei for 3D, Framer Motion for UI, Tailwind for styling.
- Optimize models and test performance with Lighthouse.