Skip to content

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

feat: added docs sponsor banner

dev_wandry8d6230eb8cf6
diff --git a/app/(home)/components/sections/get-started.tsx b/app/(home)/components/sections/get-started.tsx
index 39de94b1..6a935f9b 100644
--- a/app/(home)/components/sections/get-started.tsx
+++ b/app/(home)/components/sections/get-started.tsx
@@ -1,4 +1,3 @@
-import { ArrowRight } from "lucide-react";
import Link from "next/link";
import { CodeBlockCommand } from "@/components/docs/code-block-command";
import { convertNpmCommand } from "@/lib/convert-npm-command";
@@ -120,18 +119,6 @@ export function GetStarted() {
</div>
<FeaturedStep step={ADD} delay={0.08} />
</div>
-
- {/* <FadeUp delay={0.1}>
- <div className="mt-8 flex justify-center">
- <Link
- href="/docs/getting-started/installation"
- className="inline-flex items-center gap-1.5 text-sm font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:text-foreground focus-visible:outline-none"
- >
- Read the full installation guide
- <ArrowRight className="size-4" aria-hidden="true" />
- </Link>
- </div>
- </FadeUp> */}
</div>
</section>
);
diff --git a/app/docs/layout.tsx b/app/docs/layout.tsx
index 5c4a3d40..27fc997c 100644
--- a/app/docs/layout.tsx
+++ b/app/docs/layout.tsx
@@ -1,6 +1,7 @@
import type { ReactNode } from "react";
import { DocsHeader } from "@/components/docs/docs-header";
import { DocsShell } from "@/components/docs/docs-shell";
+import { DocsSponsorBanner } from "@/components/docs/docs-sponsor-banner";
import { DocsTabsBar } from "@/components/docs/docs-tabs-bar";
import { splitDocsTree } from "@/lib/docs-tabs";
import { withNewBadges } from "@/lib/with-new-badges";
@@ -23,9 +24,15 @@ export default async function Layout({ children }: { children: ReactNode }) {
over the sidebar, tabs starting at the article column's left edge. */}
<DocsHeader />
<DocsTabsBar />
- <DocsShell componentsTree={components} primitivesTree={primitives}>
- {children}
- </DocsShell>
+ {/* `relative` anchor begins just below the sticky tab bar so the floating
+ sponsor banner's `top-0` lands at the docs content top. The banner is
+ absolute (non-sticky) and overlaps the article/TOC top-right. */}
+ <div className="relative">
+ <DocsSponsorBanner />
+ <DocsShell componentsTree={components} primitivesTree={primitives}>
+ {children}
+ </DocsShell>
+ </div>
</>
);
}
diff --git a/components/docs/docs-sponsor-banner.tsx b/components/docs/docs-sponsor-banner.tsx
new file mode 100644
index 00000000..4ad53fb6
--- /dev/null
+++ b/components/docs/docs-sponsor-banner.tsx
@@ -0,0 +1,61 @@
+import { ArrowUpRight } from "lucide-react";
+import Link from "next/link";
+import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
+import { getGoldSponsors } from "@/config/sponsors";
+import { cn } from "@/lib/utils";
+
+export function DocsSponsorBanner() {
+ const goldSponsors = getGoldSponsors();
+
+ return (
+ <div className="pointer-events-none absolute right-0 top-10 z-20 mx-auto hidden w-full max-w-(--fd-layout-width) justify-end px-4 [--fd-layout-width:97rem] lg:flex">
+ <Card size="sm" className="pointer-events-auto w-72 gap-4 shadow-2xs">
+ <CardHeader className="flex flex-row items-center justify-between gap-2">
+ <CardTitle>Sponsors</CardTitle>
+ <Link
+ href="/sponsors"
+ className="inline-flex items-center gap-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:text-foreground focus-visible:outline-none"
+ >
+ Become a sponsor
+ <ArrowUpRight className="size-3.5" aria-hidden="true" />
+ </Link>
+ </CardHeader>
+
+ <CardContent className="flex flex-col gap-3">
+ <span className="text-[0.625rem] font-medium uppercase tracking-wide text-muted-foreground">
+ Gold
+ </span>
+
+ {goldSponsors.length > 0 ? (
+ <div className="flex flex-col gap-2">
+ {goldSponsors.map((sponsor) => (
+ <a
+ key={sponsor.id}
+ href={sponsor.website}
+ target="_blank"
+ rel="noreferrer"
+ className="group flex items-center justify-center gap-3 rounded-2xl surface-card px-3 py-2.5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40"
+ >
+ {/** biome-ignore lint/performance/noImgElement: sponsor logos are SVGs of arbitrary sizes */}
+ <img
+ src={sponsor.logoUrl}
+ alt={sponsor.name}
+ className={cn(
+ "max-h-6 w-auto shrink-0 object-contain opacity-80 grayscale transition-all duration-300 dark:[filter:grayscale(1)_brightness(0)_invert(1)] ",
+ sponsor.customStyles,
+ )}
+ style={{ transform: `scale(${sponsor.logoScale ?? 1})` }}
+ />
+ </a>
+ ))}
+ </div>
+ ) : (
+ <span className="rounded-2xl surface-card px-3 py-2.5 text-xs font-medium text-muted-foreground">
+ Your logo here
+ </span>
+ )}
+ </CardContent>
+ </Card>
+ </div>
+ );
+}
diff --git a/config/sponsors.ts b/config/sponsors.ts
index a725441b..106b6eb7 100644
--- a/config/sponsors.ts
+++ b/config/sponsors.ts
@@ -59,6 +59,15 @@ export const sponsors: Sponsor[] = [
},
].filter(sponsor => !sponsor.isPaste);
+/**
+ * The current "gold" sponsors — our highest tier is `partner`, so gold maps to
+ * the partner-tier entries. Returns an empty array when none are active, in
+ * which case the banner falls back to a "Your logo here" placeholder.
+ */
+export function getGoldSponsors(): Sponsor[] {
+ return sponsors.filter((sponsor) => sponsor.tier === "partner");
+}
+
export type BillingMode = "monthly" | "one-time";
export type Tier = {