Skip to content
Brok UI

Loading…

No results

OG Image

Open source

Open Graph social-card templates (1200×630) — minimal, editorial, product, profile, stat, quote and more — token-themed and ready to screenshot in an OG route.

Preview

1 of 16

resources/views/blocks/og-image-simple.blade.php Blade
@props([
    'label' => 'Open Graph',
    'title' => 'Ship social cards that match your brand',
    'description' => 'A copy-into-your-app registry of token-themed Open Graph card templates.',
    'brand' => 'ogimagecn',
    'logo' => null,
])

{{--
    Open Graph card — "Simple". A minimal, centered 1200×630 social card with an
    eyebrow badge, title, description and a bottom brand mark. Adapted from
    ogimagecn.com to our system: the violet accent maps to the `primary` token,
    the radial glow is a blurred token overlay, and the card follows the active
    theme. Render it inside a 1200×630 viewport in your OG image route (e.g. a
    Browsershot screenshot) for pixel-accurate social cards.
--}}
<figure
    data-slot="og-image"
    data-variant="simple"
    {{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full flex-col items-center justify-center overflow-hidden rounded-lg border border-border bg-background p-10 text-center text-foreground sm:p-16 lg:p-24']) }}
>
    {{-- Accent glow rising from the top edge (decorative). --}}
    <div aria-hidden="true" class="pointer-events-none absolute inset-x-0 -top-1/3 -z-10 mx-auto h-2/3 w-2/3 rounded-full bg-primary/20 blur-3xl"></div>

    <x-ui.badge variant="outline" class="uppercase tracking-wide">
        <span class="size-2 rounded-full bg-primary" aria-hidden="true"></span>
        {{ __($label) }}
    </x-ui.badge>

    <figcaption class="mt-6 flex flex-col items-center sm:mt-8">
        <p class="max-w-3xl text-balance text-2xl font-bold leading-[1.05] tracking-tight sm:text-4xl lg:text-6xl">{{ __($title) }}</p>
        <p class="mt-4 max-w-2xl text-pretty text-sm text-muted-foreground sm:mt-6 sm:text-lg lg:text-2xl">{{ __($description) }}</p>
    </figcaption>

    <div class="absolute bottom-6 flex items-center gap-4 text-sm font-semibold sm:bottom-12 sm:text-lg">
        @if ($logo)
            <img src="{{ $logo }}" alt="" class="size-7 rounded-md object-contain" />
        @else
            <span class="size-7 rounded-md bg-primary" aria-hidden="true"></span>
        @endif
        {{ __($brand) }}
    </div>
</figure>

Installation

terminal
php artisan ui:add blocks/og-image-simple

Installs these dependencies automatically:

Registry contract

Install confidence

php artisan ui:add blocks/og-image-simple writes only the generated targets below. The CLI validates each file hash before writing and prompts before replacing local changes unless --force is used.

Version
1.0.3
License
open
Stability
stable
Contract
v1
Foundation
≥ 1.0.0
Type Generated target
blade resources/views/blocks/og-image-simple.blade.php

Registry dependencies

badge

Package dependencies

composer: jml/brok:^0.2

Use with AI

A brief for your coding agent: what the block is, the install command, how to render it, its props and the rules. Copy it, or open a prompt about this block in an assistant.

og-image-simple.md
# Brok UI block: OG Simple (`og-image-simple`)

A minimal, centered Open Graph card with an eyebrow badge, title, description and a bottom brand mark.

Brok UI is a Laravel Blade registry. `ui:add` copies this block into the app as plain Blade the app owns; it composes installed `<brok:*>` primitives and semantic design tokens.

## Install

```bash
php artisan ui:add blocks/og-image-simple
```

## Render it

```blade
<x-blocks.og-image-simple />
```

## Props

- `label` (string, default `Open Graph`) — Eyebrow label shown inside the badge above the title.
- `title` (string, default `Ship social cards that match your brand`) — Large centered headline.
- `description` (string, default `A copy-into-your-app registry of token-themed Open Graph card templates.`) — Supporting copy under the title.
- `brand` (string, default `ogimagecn`) — Brand wordmark shown next to the logo mark in the footer.
- `logo` (mixed|null, default `null`) — Optional logo image URL; falls back to a solid token square when null.

## Use when

- Use for a minimal, centered social card that needs only an eyebrow badge, a title and a short description above a small brand mark.
- Suited as the default fallback Open Graph template for pages without a more specific visual story, such as no photo, quote, stat or product.

## Avoid when

- Avoid when the card needs a full-bleed background image, a grid/technical look, or secondary content like an author or price; use og-image-photo (photo), og-image-grid (grid) or og-image-product (product) instead.

## Rules

- Render the installed block with `<x-blocks.og-image-simple />` and pass data through its props; edit the copied file only for structural changes.
- Keep the semantic design tokens (`bg-background`, `text-muted-foreground`); never swap in raw colour utilities.
- Keep the `data-slot` attributes and the logical (start/end) spacing so the markup still mirrors under `dir="rtl"`.

## Links

- Docs: https://brokui.dev/blocks/og-image-simple
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/og-image-simple.json

Working in Claude Code, Cursor or Codex? Give the agent the whole registry through the MCP server or the Brok UI skill.

Guidance

Use when

  • Use for a minimal, centered social card that needs only an eyebrow badge, a title and a short description above a small brand mark.
  • Suited as the default fallback Open Graph template for pages without a more specific visual story, such as no photo, quote, stat or product.

Avoid when

  • Avoid when the card needs a full-bleed background image, a grid/technical look, or secondary content like an author or price; use og-image-photo (photo), og-image-grid (grid) or og-image-product (product) instead.

Anti-patterns

  • Do not replace semantic props with conflicting utility classes.
  • Do not remove labels, focus styles, or state attributes.
Anatomy
figure root accent glow eyebrow badge title description brand mark

Usage

Render the block as a component, passing data where useful:

resources/views/welcome.blade.php Blade
<x-blocks.og-image-simple />

Built from primitives

Composes <brok:*> Semantic tokens Re-themeable RTL-ready

This block composes installed <brok:*> primitives and semantic design tokens only — it does not reimplement any primitive. Re-theme it (light, dark, admin, customer) by editing CSS variables; flip the preview to RTL to confirm it mirrors.

Source

The exact, editable file ui:add writes into your app. The preview above renders this same source — there are no preview-only blocks.

resources/views/blocks/og-image-simple.blade.php Blade
@props([
    'label' => 'Open Graph',
    'title' => 'Ship social cards that match your brand',
    'description' => 'A copy-into-your-app registry of token-themed Open Graph card templates.',
    'brand' => 'ogimagecn',
    'logo' => null,
])

{{--
    Open Graph card — "Simple". A minimal, centered 1200×630 social card with an
    eyebrow badge, title, description and a bottom brand mark. Adapted from
    ogimagecn.com to our system: the violet accent maps to the `primary` token,
    the radial glow is a blurred token overlay, and the card follows the active
    theme. Render it inside a 1200×630 viewport in your OG image route (e.g. a
    Browsershot screenshot) for pixel-accurate social cards.
--}}
<figure
    data-slot="og-image"
    data-variant="simple"
    {{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full flex-col items-center justify-center overflow-hidden rounded-lg border border-border bg-background p-10 text-center text-foreground sm:p-16 lg:p-24']) }}
>
    {{-- Accent glow rising from the top edge (decorative). --}}
    <div aria-hidden="true" class="pointer-events-none absolute inset-x-0 -top-1/3 -z-10 mx-auto h-2/3 w-2/3 rounded-full bg-primary/20 blur-3xl"></div>

    <x-ui.badge variant="outline" class="uppercase tracking-wide">
        <span class="size-2 rounded-full bg-primary" aria-hidden="true"></span>
        {{ __($label) }}
    </x-ui.badge>

    <figcaption class="mt-6 flex flex-col items-center sm:mt-8">
        <p class="max-w-3xl text-balance text-2xl font-bold leading-[1.05] tracking-tight sm:text-4xl lg:text-6xl">{{ __($title) }}</p>
        <p class="mt-4 max-w-2xl text-pretty text-sm text-muted-foreground sm:mt-6 sm:text-lg lg:text-2xl">{{ __($description) }}</p>
    </figcaption>

    <div class="absolute bottom-6 flex items-center gap-4 text-sm font-semibold sm:bottom-12 sm:text-lg">
        @if ($logo)
            <img src="{{ $logo }}" alt="" class="size-7 rounded-md object-contain" />
        @else
            <span class="size-7 rounded-md bg-primary" aria-hidden="true"></span>
        @endif
        {{ __($brand) }}
    </div>
</figure>

Ownership & lifecycle

Owner, release state, review evidence and adoption for this item.
Owner
Platform UI (@JoshJML)
Current version
1.0.3
Status
Stable
License
open
Deprecation
Not deprecated
Contract
v1
Foundation
≥ 1.0.0