Static product card
Build once, reuse everywhere
The same tree can be serialized on the server, cached at the edge, and handed to the client without waiting for a measurement pass.
Generate a blueprint before hydration, then hand the runtime a precomputed structure for the first paint.
Serialize the loading structure on the server or at build time and reuse it across requests
Static product card
The same tree can be serialized on the server, cached at the edge, and handed to the client without waiting for a measurement pass.
Blueprint summary
Source
static
Nodes
1
Mode
flow
The runtime receives the blueprint directly and uses the fast path immediately
Loading state
Toggle the fast path skeleton on and off
Blueprint source
static
Measured on client
0
Render mode
flow
Because the blueprint is already hydrated, the runtime skips the expensive measurement step and can render the loading state immediately.
Minimal server-side usage pattern for real apps
import { generateStaticBlueprint } from "@ghostframes/runtime";
import { AutoSkeleton } from "@ghostframes/runtime";
const blueprint = generateStaticBlueprint(
<article>
<h3>Build once, reuse everywhere</h3>
<p>Serialize the loading structure on the server.</p>
</article>
);
export function ProductPreview({ loading }: { loading: boolean }) {
return (
<AutoSkeleton loading={loading} blueprint={blueprint}>
<ProductCard />
</AutoSkeleton>
);
}Validate server blueprints, apply cache guards, and defer costly remeasurements
// server.tsx (RSC)
import { generateStaticBlueprint } from "@ghostframes/runtime";
const blueprint = generateStaticBlueprint(
<article>
<h3>Build once, reuse everywhere</h3>
<p>Serialize loading structure on the server.</p>
</article>
);
// client.tsx
import { AutoSkeleton } from "@ghostframes/runtime";
<AutoSkeleton
loading={loading}
hydrateBlueprint={blueprint}
blueprintSource="server"
blueprintCachePolicy={{ version: 1, ttlMs: 5 * 60_000 }}
measurementPolicy={{ mode: "idle", budgetMs: 12 }}
onBlueprintInvalidated={(reason) => console.warn(reason)}
>
<ProductCard />
</AutoSkeleton>;