SDK Open Graph Image Template
A dark SDK card with a code window, title, and language chips.
A dark SDK card with a code window, title, and language chips.
Every Open Graph image template is included with Basic and Pro. Pick a plan to copy the code, install with the CLI, and download the raw SVG.
Already purchased? Log in
Use the SDK template for client library launches and their docs. It pairs the SDK pitch and a row of language chips with a drawn code window, so the card says typed clients for your stack and shows code in the same glance, the two signals a developer scans on an SDK page.
This template is a metadata image route for the Next.js App Router. The file exports size, contentType, and alt values plus a default async function that returns an ImageResponse. When the SDK page is shared, satori converts the JSX into an SVG document, the runtime rasterizes that SVG into a 1200 by 630 PNG, and Next.js serves the result and wires the og:image and twitter:image tags into the page head automatically. The code window is drawn from bars rather than real source, so it suggests code cleanly without a syntax highlighter or a screenshot.
Install with the shadcn CLI using your Shadcn UI Blocks API key:
npx shadcn@latest add @shadcn-ui-blocks/og-image-sdk-release
The file lands at app/opengraph-image.tsx, which makes it the site wide share card. Move it into the SDK docs segment, for example app/sdk/opengraph-image.tsx, when the library has its own home. You can also copy the code from this page straight into your project.
The card renders text with Inter, read from assets/fonts at your project root with node:fs so the font files never ship to the browser. Download the latin woff files for weights 400, 500, 600, and 700 from Fontsource and save them as assets/fonts/inter-latin-400-normal.woff and so on.
The content object holds brand, the title, the description, the chips array of languages, and the url. Edit the chips to name the runtimes you actually ship; three sit well on the row. The codeLines array above the template draws the window as indent, width, and color tuples, so reshape it to suggest your language's silhouette and keep the light accents sparse. The title reads best across two lines at its 56px size.
satori supports a focused subset of CSS: flexbox layout only, flat colors, and an explicit display: flex on any element with multiple children. Keep those rules in mind if you rework the layout.