diff --git a/packages/fern-docs/bundle/src/app/layout.tsx b/packages/fern-docs/bundle/src/app/layout.tsx
index e62a35da6b..dd3088ebb4 100644
--- a/packages/fern-docs/bundle/src/app/layout.tsx
+++ b/packages/fern-docs/bundle/src/app/layout.tsx
@@ -6,6 +6,7 @@ import { Providers } from "@fern-docs/components/providers/providers";
import type { Metadata, Viewport } from "next/types";
import { experimental_taintUniqueValue } from "react";
+import { AsyncStylesheet } from "@/components/AsyncStylesheet";
import { ConsoleMessage } from "@/components/console-message";
import { WebSocketRefresh } from "@/components/websocket-refresh";
@@ -56,23 +57,10 @@ export default function Layout({ children }: { children: React.ReactNode }) {
{/* Non-blocking KaTeX CSS loading */}
-
-
- '
- }}
- />
);
diff --git a/packages/fern-docs/bundle/src/components/AsyncStylesheet.tsx b/packages/fern-docs/bundle/src/components/AsyncStylesheet.tsx
new file mode 100644
index 0000000000..dd91da19d6
--- /dev/null
+++ b/packages/fern-docs/bundle/src/components/AsyncStylesheet.tsx
@@ -0,0 +1,41 @@
+"use client";
+
+/**
+ * AsyncStylesheet - Non-blocking CSS loading component
+ *
+ * Loads a stylesheet asynchronously without blocking page render.
+ * Uses the media="print" + onLoad trick for optimal performance while
+ * maintaining React/TypeScript compatibility.
+ */
+
+interface AsyncStylesheetProps {
+ href: string;
+ crossOrigin?: "anonymous" | "use-credentials";
+}
+
+export function AsyncStylesheet({ href, crossOrigin = "anonymous" }: AsyncStylesheetProps) {
+ return (
+ <>
+ {/* Preload hint for early resource discovery */}
+
+
+ {/* Async loading with media swap trick - React's onLoad works here */}
+ {
+ (e.target as HTMLLinkElement).media = "all";
+ }}
+ />
+
+ {/* Fallback for users with JavaScript disabled */}
+ `
+ }}
+ />
+ >
+ );
+}