Installation
$ pnpm dlx shadcn@latest add @ogimagecn/stat
Usage
import { ImageResponse } from "next/og";
import { Stat } from "@/components/og/stat";
export function GET() {
return new ImageResponse(
<Stat
label="Images rendered"
value="10M+"
trend="+24%"
caption="Open Graph images generated with next/og this year."
brand="ogimagecn"
/>,
{ width: 1200, height: 630 }
);
}API Reference
Stat
| Prop | Type |
|---|---|
label | string |
value | string |
caption | string |
trend | string |
brand | string |
logo | string |