Installation
$ pnpm dlx shadcn@latest add @ogimagecn/profile
Usage
import { ImageResponse } from "next/og";
import { Profile } from "@/components/og/profile";
export function GET() {
return new ImageResponse(
<Profile
name="Ada Lovelace"
role="Founder & Engineer"
bio="Building tools for the open web."
website="ada.dev"
avatar="https://example.com/avatar.png"
/>,
{ width: 1200, height: 630 }
);
}API Reference
Profile
| Prop | Type |
|---|---|
name | string |
role | string |
bio | string |
avatar | string |
website | string |