Skip to content

Production-ready animations, transitions, backgrounds, and scenes for Remotion

feat: added shader bg heroc

dev_wandryb57be12237d8
diff --git a/app/(home)/components/hero-shader-bg.tsx b/app/(home)/components/hero-shader-bg.tsx
new file mode 100644
index 00000000..dc36bdce
--- /dev/null
+++ b/app/(home)/components/hero-shader-bg.tsx
@@ -0,0 +1,31 @@
+"use client";
+
+import { NeuroNoise } from "@paper-design/shaders-react";
+import { useTheme } from "next-themes";
+import { useEffect, useState } from "react";
+
+const NEURO_COLORS = {
+ light: { front: "#8d87b8", mid: "#e2e1ee", back: "#ffffff" },
+ dark: { front: "#6a6390", mid: "#2a2740", back: "#1a1920" },
+};
+
+export function HeroNeuroBg() {
+ const { resolvedTheme } = useTheme();
+ const [mounted, setMounted] = useState(false);
+ useEffect(() => setMounted(true), []);
+ if (!mounted) return null;
+ const colors = NEURO_COLORS[resolvedTheme === "dark" ? "dark" : "light"];
+ return (
+ <div className="pointer-events-none absolute inset-x-0 -top-16 h-screen opacity-90 [mask-image:linear-gradient(to_bottom,black_55%,transparent_98%)]">
+ <NeuroNoise
+ className="h-full w-full"
+ colorFront={colors.front}
+ colorMid={colors.mid}
+ colorBack={colors.back}
+ brightness={0.05}
+ contrast={0.35}
+ speed={0.3}
+ />
+ </div>
+ );
+}
diff --git a/app/(home)/components/page-shell.tsx b/app/(home)/components/page-shell.tsx
index a9341b36..d99eb525 100644
--- a/app/(home)/components/page-shell.tsx
+++ b/app/(home)/components/page-shell.tsx
@@ -2,7 +2,7 @@ import type { ReactNode } from "react";
export function PageShell({ children }: { children: ReactNode }) {
return (
- <div className="page-shell relative flex min-h-screen flex-col bg-background font-sans text-foreground antialiased">
+ <div className="page-shell relative flex min-h-screen flex-col font-sans text-foreground antialiased">
{children}
</div>
);
diff --git a/app/(home)/components/sections/hero.tsx b/app/(home)/components/sections/hero.tsx
index 60146ceb..c5c5b6da 100644
--- a/app/(home)/components/sections/hero.tsx
+++ b/app/(home)/components/sections/hero.tsx
@@ -9,6 +9,7 @@ import { Button } from "@/components/ui/button";
import { SPRING_BOUNCE } from "@/config/site";
import { useTrackEvent } from "@/lib/analytics";
import { FadeUp } from "../fade-up";
+import { HeroNeuroBg } from "../hero-shader-bg";
import { InstallAll } from "../install-all";
export function Hero() {
@@ -40,11 +41,10 @@ export function Hero() {
const aspectRatio = "16 / 9";
return (
- <section className="relative overflow-hidden pt-10 pb-16 sm:pt-16 sm:pb-24">
- {/* Theme-aware backdrop: dotted grid that fades out + a soft top glow. */}
+ <section className="relative isolate pt-10 pb-16 sm:pt-16 sm:pb-24">
<div aria-hidden className="absolute inset-0 -z-10">
<div className="absolute inset-0 bg-grid-fade" />
- <div className="absolute inset-x-0 top-0 h-[420px] bg-[radial-gradient(60%_100%_at_50%_0%,var(--color-muted),transparent_70%)] opacity-70" />
+ <HeroNeuroBg />
</div>
<div className="section">
diff --git a/app/(home)/components/sticky-header-shell.tsx b/app/(home)/components/sticky-header-shell.tsx
index ff295938..450ab165 100644
--- a/app/(home)/components/sticky-header-shell.tsx
+++ b/app/(home)/components/sticky-header-shell.tsx
@@ -11,9 +11,8 @@ export function StickyHeaderShell({ children }: { children: ReactNode }) {
<header
className={cn(
"sticky inset-x-0 top-0 z-40 transition-[background-color,border-color,padding] duration-300",
- scrolled
- ? "border-transparent bg-transparent py-3"
- : "border-border bg-background/70 backdrop-blur-xl",
+ scrolled ? "py-3" : "",
+ "border-transparent bg-transparent",
)}
>
<div