Skip to main content
The basic template is a production-ready, highly customizable template that supports three different layouts and full RTL support. Basic Template

Import

import template from "@ogify/templates/basic";
import type { TemplateParams } from "@ogify/templates/basic";

Parameters

title
string
required
The main heading text
subtitle
string
Optional subtitle or description text
brandName
string
Your brand or company name
URL to your brand logo image
cta
string
Call-to-action text (e.g., “Read More”, “Learn More”)
extras
string[]
Additional metadata items (e.g., date, author, reading time)
layout
'aligned' | 'centered' | 'split'
default:"aligned"
Layout style for the template
primaryColor
string
default:"#4c8f5f"
Primary color for gradients and background
secondaryColor
string
default:"#faf8f5"
Secondary color for gradients
textColor
string
default:"#fff"
Text color
pattern
string
default:"https://assets.ogify.dev/patterns/cubes.png"
Background pattern image URL

Layouts

Left-aligned layout (or right-aligned for RTL) with brand logo at the top and metadata at the bottom.
const buffer = await renderer.renderToImage('basic', {
  title: 'Getting Started with OGify',
  subtitle: 'Learn how to generate beautiful Open Graph images',
  brandName: 'OGify',
  brandLogo: 'https://example.com/logo.png',
  layout: 'aligned',
  extras: ['5 min read', 'Jan 12, 2026'],
});

Examples

import { createRenderer } from "@ogify/core";
import template from "@ogify/templates/basic";
import type { TemplateParams } from "@ogify/templates/basic";

const renderer = createRenderer<{ basic: TemplateParams }>({
  templates: { basic: template },
});

const buffer = await renderer.renderToImage("basic", {
  title: "Hello World",
  subtitle: "My first OG image",
  layout: "centered",
});

Fonts

The basic template uses JetBrains Mono font in two weights:
  • Regular (400)
  • Bold (700)

Features

Fully supports right-to-left languages. Pass isRTL: true in the options to enable RTL layout.
Control primary color, secondary color, and text color to match your brand.
Choose from aligned, centered, or split layouts depending on your content needs.
Add visual interest with customizable background patterns.
Include a prominent CTA button with automatic arrow icons that flip for RTL.

Tips

Use the extras array to display metadata like reading time, date, category, or author information.
The template automatically adjusts text size based on whether a subtitle is present - titles are larger when there’s no subtitle.
Background gradients are created using radial gradients from the corners, creating a modern, dynamic look.