Customize
Installation
$ pnpm dlx shadcn@latest add @ogimagecn/recipe
Usage
import { ImageResponse } from "next/og";
import { Recipe } from "@/components/og/recipe";export function GET() {
return new ImageResponse(
<Recipe
title="One-pot tomato basil pasta"
description="Blistered tomatoes, garlic, and basil tossed with bucatini in one pan."
duration="25 min"
servings="Serves 4"
brand="ogimagecn"
/>,
{ width: 1200, height: 630 }
);
}API Reference
Recipe
| Prop | Type |
|---|---|
title | string |
description | string |
duration | string |
servings | string |
brand | string |
logo | string |