OG Image
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
@props([
'title' => 'Build social cards on a grid',
'description' => 'Token-themed Open Graph templates that snap to a precise dashed-grid layout.',
'brand' => 'ogimagecn',
'logo' => null,
])
{{--
Open Graph card — "Grid". A full-bleed dark 1200×630 social card with dashed
grid guide lines, a big title and description anchored top-start, and a brand
mark in the bottom-end corner. Adapted from ogimagecn.com to our system: the
cyan brand chip maps to the `info` token, the grid rules use `border-dashed
border-border`, 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="grid"
{{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full overflow-hidden rounded-lg border border-border bg-background p-8 text-foreground sm:p-12 lg:p-20']) }}
>
{{-- Dashed grid guide lines (decorative). --}}
<div aria-hidden="true" class="pointer-events-none absolute inset-y-0 start-8 -z-10 border-s border-dashed border-border sm:start-12 lg:start-16"></div>
<div aria-hidden="true" class="pointer-events-none absolute inset-y-0 end-8 -z-10 border-s border-dashed border-border sm:end-12 lg:end-16"></div>
<div aria-hidden="true" class="pointer-events-none absolute inset-x-0 top-8 -z-10 border-t border-dashed border-border sm:top-12 lg:top-16"></div>
<div aria-hidden="true" class="pointer-events-none absolute inset-x-0 bottom-8 -z-10 border-t border-dashed border-border sm:bottom-12 lg:bottom-16"></div>
<figcaption class="flex flex-col">
<p class="max-w-[880px] text-balance text-3xl font-bold leading-[1.05] tracking-tight sm:text-5xl lg:text-7xl">{{ __($title) }}</p>
<p class="mt-4 max-w-[780px] text-pretty text-base leading-snug text-muted-foreground sm:mt-6 sm:text-xl lg:text-3xl">{{ __($description) }}</p>
</figcaption>
<x-ui.badge variant="ghost" size="lg" class="absolute bottom-12 end-12 font-semibold sm:bottom-16 sm:end-16 sm:text-xl lg:text-3xl">
@if ($logo)
<img src="{{ $logo }}" alt="" class="size-9 rounded-md object-contain sm:size-11" />
@else
<span class="size-9 rounded-md bg-info sm:size-11" aria-hidden="true"></span>
@endif
{{ __($brand) }}
</x-ui.badge>
</figure>
Installation
php artisan ui:add blocks/og-image-grid
Registry contract
Install confidence
php artisan ui:add blocks/og-image-grid
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-grid.blade.php |
Registry dependencies
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.
# Brok UI block: OG Grid (`og-image-grid`)
A full-bleed dark Open Graph card with dashed grid guide lines, a top-start title and description, and a bottom-end 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-grid
```
## Render it
```blade
<x-blocks.og-image-grid />
```
## Props
- `title` (string, default `Build social cards on a grid`) — Large headline anchored top-start.
- `description` (string, default `Token-themed Open Graph templates that snap to a precise dashed-grid layout.`) — Supporting copy under the title.
- `brand` (string, default `ogimagecn`) — Brand name shown in the bottom-end badge.
- `logo` (mixed|null, default `null`) — Optional logo image URL; falls back to a solid token square when null.
## Use when
- Use for a full-bleed dark social card whose title and description sit top-start inside dashed grid guide lines, with the brand pill anchored bottom-end.
- Suited to technical or developer-facing pages that want a precise, blueprint-style composition rather than a centered or photo-driven layout.
## Avoid when
- Avoid when a lighter editorial surface or an author/avatar row is needed; use og-image-blog (blog) or og-image-editorial (editorial) instead.
## Rules
- Render the installed block with `<x-blocks.og-image-grid />` 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-grid
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/og-image-grid.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 full-bleed dark social card whose title and description sit top-start inside dashed grid guide lines, with the brand pill anchored bottom-end.
- Suited to technical or developer-facing pages that want a precise, blueprint-style composition rather than a centered or photo-driven layout.
Avoid when
- Avoid when a lighter editorial surface or an author/avatar row is needed; use og-image-blog (blog) or og-image-editorial (editorial) instead.
Anti-patterns
- Do not replace semantic props with conflicting utility classes.
- Do not remove labels, focus styles, or state attributes.
- Anatomy
Usage
Render the block as a component, passing data where useful:
<x-blocks.og-image-grid />
Built from primitives
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.
@props([
'title' => 'Build social cards on a grid',
'description' => 'Token-themed Open Graph templates that snap to a precise dashed-grid layout.',
'brand' => 'ogimagecn',
'logo' => null,
])
{{--
Open Graph card — "Grid". A full-bleed dark 1200×630 social card with dashed
grid guide lines, a big title and description anchored top-start, and a brand
mark in the bottom-end corner. Adapted from ogimagecn.com to our system: the
cyan brand chip maps to the `info` token, the grid rules use `border-dashed
border-border`, 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="grid"
{{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full overflow-hidden rounded-lg border border-border bg-background p-8 text-foreground sm:p-12 lg:p-20']) }}
>
{{-- Dashed grid guide lines (decorative). --}}
<div aria-hidden="true" class="pointer-events-none absolute inset-y-0 start-8 -z-10 border-s border-dashed border-border sm:start-12 lg:start-16"></div>
<div aria-hidden="true" class="pointer-events-none absolute inset-y-0 end-8 -z-10 border-s border-dashed border-border sm:end-12 lg:end-16"></div>
<div aria-hidden="true" class="pointer-events-none absolute inset-x-0 top-8 -z-10 border-t border-dashed border-border sm:top-12 lg:top-16"></div>
<div aria-hidden="true" class="pointer-events-none absolute inset-x-0 bottom-8 -z-10 border-t border-dashed border-border sm:bottom-12 lg:bottom-16"></div>
<figcaption class="flex flex-col">
<p class="max-w-[880px] text-balance text-3xl font-bold leading-[1.05] tracking-tight sm:text-5xl lg:text-7xl">{{ __($title) }}</p>
<p class="mt-4 max-w-[780px] text-pretty text-base leading-snug text-muted-foreground sm:mt-6 sm:text-xl lg:text-3xl">{{ __($description) }}</p>
</figcaption>
<x-ui.badge variant="ghost" size="lg" class="absolute bottom-12 end-12 font-semibold sm:bottom-16 sm:end-16 sm:text-xl lg:text-3xl">
@if ($logo)
<img src="{{ $logo }}" alt="" class="size-9 rounded-md object-contain sm:size-11" />
@else
<span class="size-9 rounded-md bg-info sm:size-11" aria-hidden="true"></span>
@endif
{{ __($brand) }}
</x-ui.badge>
</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