"use client";
import { ThemeColor, DesignConfig, DAISY_THEMES, HEROUI_MARKETING_THEMES } from "./types";
// Marketing Site surface — public-facing pages: hero, features, pricing, CTA
// Context: prospective users discovering the product, not signed-in users.
// All components accept a DesignConfig to drive live preview changes.
function fontStack(font?: string) {
if (font === "plus-jakarta") return '"Plus Jakarta Sans", system-ui, sans-serif';
if (font === "dm-sans") return '"DM Sans", system-ui, sans-serif';
if (font === "geist") return '"Geist", system-ui, sans-serif';
if (font === "inter") return '"Inter", system-ui, sans-serif';
if (font === "nunito") return '"Nunito", system-ui, sans-serif';
return "system-ui, sans-serif";
}
// ---------------------------------------------------------------------------
// DaisyUI
// ---------------------------------------------------------------------------
export function MarketingDaisy({ themeColor, config }: { themeColor?: ThemeColor; config?: DesignConfig }) {
const theme = themeColor ?? DAISY_THEMES[0];
const isDark = config ? config.mode === "dark" : (theme.bg ?? "#fff").match(/^#[012]/i) !== null;
const bg = isDark ? (theme.bg ?? "#1d232a") : (theme.bg?.match(/^#[012]/) ? "#fff" : (theme.bg ?? "#fff"));
const text = isDark ? (theme.textColor ?? "#a6adba") : (theme.textColor ?? "#1f2937");
const muted = isDark ? (theme.mutedText ?? "rgba(255,255,255,0.4)") : (theme.mutedText ?? "#6b7280");
const card = isDark ? (theme.cardBg ?? "rgba(255,255,255,0.04)") : (theme.cardBg ?? "#f9fafb");
const border = isDark ? (theme.borderColor ?? "rgba(255,255,255,0.08)") : (theme.borderColor ?? "#e5e7eb");
const bgStyle = config?.background ?? "solid";
const navStyle = config?.nav ?? "standard";
const hdrStyle = config?.header ?? "centered";
const comps = config?.components ?? ["features", "pricing"];
const ff = fontStack(config?.font);
// Background overlay applied to the hero area
const heroBgLayer =
bgStyle === "gradient" ? `radial-gradient(ellipse 80% 55% at 50% -5%, ${theme.primary}40, transparent)` :
bgStyle === "pattern" ? undefined : // handled as a full-page layer
bgStyle === "noise" ? undefined :
undefined;
const navBg = navStyle === "transparent" ? "transparent" : bg;
const navBorderB = navStyle === "transparent" ? "none" : `1px solid ${border}`;
const pillNav = navStyle === "pill";
const NavContent = () => (
<>
{/* Dot-pattern full-page overlay */}
{bgStyle === "pattern" && (
)}
{/* Nav */}
{pillNav ? (
) : (
)}
{/* Hero — centered */}
{hdrStyle === "centered" && (
{heroBgLayer &&
}
✦ {theme.label} theme · v2.0
Build faster,
ship smarter
The all-in-one platform that helps teams build, launch, and scale.
)}
{/* Hero — split layout */}
{hdrStyle === "split" && (
{heroBgLayer &&
}
✦ New · v2.0
Build faster,
ship smarter
The platform teams trust to ship faster.
{["#ff5f56","#ffbd2e","#27c93f"].map(c =>
)}
{["Revenue $12k","Users 2.8k","Growth +24%"].map(m => (
{m.split(" ")[0]}
{m.split(" ")[1]}
))}
)}
{/* Hero — with stats */}
{hdrStyle === "stats" && (
{heroBgLayer &&
}
Build faster,
ship smarter
Trusted by thousands of teams worldwide.
{[["50k+","Teams"],["99.9%","Uptime"],["10ms","Latency"]].map(([v, l]) => (
))}
)}
{/* Conditional sections */}
{comps.includes("logos") && (
Trusted by
{["Vercel","Stripe","Linear","Notion","Supabase"].map(b => (
{b}
))}
)}
{comps.includes("features") && (
{[{ icon: "⚡", title: "Lightning fast", desc: "Deploy in seconds" }, { icon: "🔒", title: "Secure by default", desc: "Enterprise-grade" }, { icon: "📈", title: "Scales with you", desc: "From 0 to millions" }].map(f => (
{f.icon}
{f.title}
{f.desc}
))}
)}
{comps.includes("steps") && (
How it works
{["Connect your repo","Configure your stack","Deploy in seconds"].map((s, i) => (
))}
)}
{comps.includes("testimonials") && (
{[{ q: "\"Deployed in 5 minutes. Incredible.\"", name: "Sarah K.", role: "CTO, Startup" }, { q: "\"Cut our infra costs by 40%.\"", name: "James R.", role: "Eng Lead" }].map(t => (
))}
)}
{comps.includes("pricing") && (
Simple pricing
{[{ plan: "Starter", price: "Free", highlight: false }, { plan: "Pro", price: "$29/mo", highlight: true }, { plan: "Enterprise", price: "Custom", highlight: false }].map(p => (
))}
)}
{comps.includes("faq") && (
FAQ
{["What's included in the free plan?","Can I upgrade anytime?","Do you offer team billing?"].map((q, i) => (
{q}
{i === 0 ? "−" : "+"}
))}
)}
{comps.includes("cta") && (
Ready to ship faster?
Join 50,000+ teams already on Acme.
)}
);
}
// ---------------------------------------------------------------------------
// HeroUI
// ---------------------------------------------------------------------------
export function MarketingHeroUI({ themeColor, config }: { themeColor?: ThemeColor; config?: DesignConfig }) {
const theme = themeColor ?? HEROUI_MARKETING_THEMES[0];
const isDark = config ? config.mode === "dark" : (theme.bg ?? "#fff") === "#09090b";
const bg = isDark ? (theme.bg ?? "#09090b") : (theme.bg ?? "#fff");
const text = isDark ? (theme.textColor ?? "#f4f4f5") : (theme.textColor ?? "#18181b");
const muted = isDark ? (theme.mutedText ?? "#71717a") : (theme.mutedText ?? "#71717a");
const card = isDark ? (theme.cardBg ?? "#18181b") : (theme.cardBg ?? "#fafafa");
const border = isDark ? (theme.borderColor ?? "#27272a") : (theme.borderColor ?? "#f4f4f5");
const bgStyle = config?.background ?? "clean";
const navStyle = config?.nav ?? "blur";
const hdrStyle = config?.header ?? "animated-badge";
const comps = config?.components ?? ["features", "metrics"];
const ff = fontStack(config?.font);
const navBlur = navStyle === "blur";
const navBg = navBlur
? (isDark ? "rgba(9,9,11,0.7)" : "rgba(255,255,255,0.7)")
: navStyle === "minimal" ? "transparent"
: bg;
const navBorderB = navStyle === "minimal" ? "none" : `1px solid ${border}`;
const heroBgOverlay =
bgStyle === "gradient-mesh" ? `radial-gradient(ellipse 70% 60% at 30% 40%, ${theme.primary}25, transparent 60%), radial-gradient(ellipse 50% 50% at 80% 60%, ${isDark ? "#06b6d422" : "#06b6d418"}, transparent 60%)` :
bgStyle === "glass" ? `linear-gradient(135deg, ${theme.primary}14, ${isDark ? "#18181b" : "#fff"} 60%)` :
bgStyle === "aurora" ? `radial-gradient(ellipse 80% 60% at 50% -10%, ${theme.primary}35, transparent 70%)` :
undefined;
return (
{heroBgOverlay &&
}
{/* Nav */}
{/* Hero — animated badge style */}
{hdrStyle === "animated-badge" && (
🚀 Now in public beta
Build faster,
ship smarter
The all-in-one platform for teams that move fast.
)}
{/* Hero — split layout */}
{hdrStyle === "split" && (
🚀 Beta
Build faster,
ship smarter
The platform for fast-moving teams.
{["#ff5f56","#ffbd2e","#27c93f"].map(c =>
)}
{["Revenue $12k","Users 2.8k","Growth +24%","Churn 2.1%"].map(m => (
{m.split(" ")[0]}
{m.split(" ")[1]}
))}
)}
{/* Hero — gradient headline */}
{hdrStyle === "gradient" && (
Build faster.
Ship smarter.
Everything your team needs in one platform.
)}
{/* Conditional sections */}
{comps.includes("features") && (
{[{ icon: "⚡", title: "10x faster deploys" }, { icon: "🔒", title: "Zero-trust security" }, { icon: "📦", title: "Any stack" }, { icon: "🌍", title: "Global CDN" }].map(f => (
))}
)}
{comps.includes("metrics") && (
{["Revenue $12k","Users 2.8k","Growth +24%","Churn 2.1%"].map((m, i) => (
{m.split(" ")[0]}
{m.split(" ")[1]}
))}
)}
{comps.includes("avatars") && (
{["#7c3aed","#2563eb","#0d9488","#e11d48"].map((c, i) => (
0 ? -8 : 0 }} />
))}
Trusted by 50,000+ teams
)}
{comps.includes("pricing") && (
{[{ plan: "Starter", price: "Free", hi: false }, { plan: "Pro", price: "$29/mo", hi: true }, { plan: "Enterprise", price: "Custom", hi: false }].map(p => (
))}
)}
{comps.includes("testimonials") && (
{[{ q: "\"Shipped 3x faster since switching.\"", name: "Sarah K." }, { q: "\"Cut infra costs by 40%.\"", name: "James R." }].map(t => (
))}
)}
{comps.includes("cta") && (
Ready to ship faster?
Join 50,000+ teams already on Acme.
)}
);
}
// ---------------------------------------------------------------------------
// Aceternity UI
// ---------------------------------------------------------------------------
export function MarketingAceternity({ config }: { themeColor?: ThemeColor; config?: DesignConfig }) {
const isDark = config?.mode !== "light";
const bgStyle = config?.background ?? "beams";
const navStyle = config?.nav ?? "minimal";
const hdrStyle = config?.header ?? "gradient-text";
const comps = config?.components ?? ["features", "moving-cards"];
const ff = fontStack(config?.font);
const bg = isDark ? "#030303" : "#f8fafc";
const text = isDark ? "#fff" : "#0f172a";
const muted = isDark ? "rgba(255,255,255,0.38)" : "#64748b";
const card = isDark ? "rgba(255,255,255,0.03)" : "rgba(0,0,0,0.03)";
const border= isDark ? "rgba(255,255,255,0.06)" : "rgba(0,0,0,0.08)";
// Background effects rendered as CSS
const BackgroundEffect = () => {
if (bgStyle === "beams") return (
{/* Vertical beam lines */}
{Array.from({ length: 8 }).map((_, i) => (
))}
);
if (bgStyle === "meteors") return (
{Array.from({ length: 6 }).map((_, i) => (
))}
);
if (bgStyle === "sparkles") return (
{Array.from({ length: 20 }).map((_, i) => (
))}
);
if (bgStyle === "wavy") return (
);
if (bgStyle === "dot-grid") return (
);
// gradient (default radial glow)
return
;
};
const floatingNav = navStyle === "floating";
return (
{/* Nav */}
{floatingNav ? (
) : (
)}
{/* Hero — gradient text */}
{hdrStyle === "gradient-text" && (
✦ Open source · 12k stars
Build the future
of the web
Beautifully crafted components built with Tailwind CSS and Framer Motion.
)}
{/* Hero — lamp effect */}
{hdrStyle === "lamp" && (
Build the future
of the web
Powered by Framer Motion and Tailwind CSS.
)}
{/* Hero — typewriter */}
{hdrStyle === "typewriter" && (
THE FUTURE IS HERE
Build the future
of the web_
Components that bring your ideas to life.
)}
{/* Conditional sections */}
{comps.includes("features") && (
{[{ label: "Animated", color: "#a855f7" }, { label: "Accessible", color: "#3b82f6" }, { label: "Open source", color: "#22c55e" }].map(f => (
{f.label}
Built for production
))}
)}
{comps.includes("badge") && (
✦ v2.0 just shipped — see what's new →
)}
{comps.includes("moving-cards") && (
What our users say
{[{ text: "\"Game changer for our team.\"", name: "Sarah K." }, { text: "\"Ships 3x faster.\"", name: "James R." }, { text: "\"Zero-config deploys.\"", name: "Mia L." }].map(t => (
))}
)}
{comps.includes("bento") && (
)}
{comps.includes("pricing") && (
{[{ plan: "Starter", price: "Free", hi: false }, { plan: "Pro", price: "$29/mo", hi: true }, { plan: "Enterprise", price: "Custom", hi: false }].map(p => (
))}
)}
{comps.includes("cta") && (
Start building today
Join thousands of developers worldwide.
)}
);
}
// ---------------------------------------------------------------------------
// Tailwind only
// ---------------------------------------------------------------------------
export function MarketingTailwind({ config }: { themeColor?: ThemeColor; config?: DesignConfig }) {
const isDark = config?.mode === "dark";
const bgStyle = config?.background ?? "clean";
const navStyle = config?.nav ?? "minimal";
const hdrStyle = config?.header ?? "editorial";
const comps = config?.components ?? ["features", "stats", "pricing"];
const ff = fontStack(config?.font);
const bg = isDark ? "#09090b" : "#fff";
const text = isDark ? "#f4f4f5" : "#09090b";
const muted = isDark ? "#71717a" : "#71717a";
const card = isDark ? "#18181b" : "#f9fafb";
const border= isDark ? "#27272a" : "#e5e7eb";
const accent = "#7c3aed";
const navBg = navStyle === "minimal" ? "transparent" : bg;
const navBorderB = navStyle === "minimal" ? "none" : `1px solid ${border}`;
return (
{/* Background effects */}
{bgStyle === "dot-grid" && (
)}
{bgStyle === "lines" && (
)}
{bgStyle === "noise" && (
)}
{/* Nav */}
{/* Hero — editorial big type */}
{hdrStyle === "editorial" && (
Now in public beta
The platform
built for scale
Everything your team needs to build, deploy, and monitor production applications.
)}
{/* Hero — split */}
{hdrStyle === "split" && (
Public beta
The platform
built for scale
Deploy anywhere. Monitor everything.
{["#ff5f56","#ffbd2e","#27c93f"].map(c =>
)}
✓ Build complete
→ Deploying…
✓ Live in 2.1s
)}
{/* Hero — centered minimal */}
{hdrStyle === "centered" && (
The platform
built for scale
Everything your team needs.
)}
{/* Conditional sections */}
{comps.includes("badge") && (
→ v2.0 released — see what's new
)}
{comps.includes("logos") && (
Trusted by
{["Vercel","Stripe","Linear","Notion","Supabase"].map(b => (
{b}
))}
)}
{comps.includes("features") && (
{[{ title: "99.9% uptime SLA", desc: "Enterprise reliability" }, { title: "10ms avg latency", desc: "Edge-first network" }, { title: "SOC2 compliant", desc: "Security baked in" }, { title: "GDPR ready", desc: "Privacy by default" }].map(f => (
))}
)}
{comps.includes("stats") && (
{[["50k+","Teams"],["99.9%","Uptime"],["10ms","Latency"],["$0","To start"]].map(([v, l], i) => (
))}
)}
{comps.includes("testimonials") && (
{[{ q: "\"Shipped 3x faster.\"", name: "Sarah K.", role: "CTO" }, { q: "\"Cut costs by 40%.\"", name: "James R.", role: "Eng Lead" }].map(t => (
{t.q}
{t.name} · {t.role}
))}
)}
{comps.includes("pricing") && (
{[{ plan: "Starter", price: "Free", hi: false }, { plan: "Pro", price: "$29/mo", hi: true }, { plan: "Enterprise", price: "Custom", hi: false }].map(p => (
))}
)}
{comps.includes("faq") && (
{["What's included in free?","Can I upgrade anytime?","Do you offer team plans?"].map((q, i) => (
{q}
{i === 0 ? "−" : "+"}
))}
)}
{comps.includes("cta") && (
Ready to ship faster?
Join 50,000+ teams already on Acme.
)}
);
}
export { DAISY_THEMES, HEROUI_MARKETING_THEMES };