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([
'label' => 'Field notes',
'title' => 'Designing in the open, one card at a time',
'brand' => 'ogimagecn',
'image' => null,
'logo' => null,
])
{{--
Open Graph card — "Photo". A full-bleed 1200×630 photo card with a bottom-aligned
label badge, large title and brand mark. Adapted from ogimagecn.com to our system:
the background image is an absolutely-positioned <img> (default null falls back to a
token gradient layer), the dark legibility scrim is a token gradient, and the accent
maps to the `primary` token. 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="photo"
{{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full flex-col justify-end overflow-hidden rounded-lg border border-border bg-background p-10 text-foreground sm:p-16 lg:p-20']) }}
>
@if ($image)
<img src="{{ $image }}" alt="" class="absolute inset-0 -z-10 size-full object-cover" />
@else
<div aria-hidden="true" class="absolute inset-0 -z-10 size-full bg-gradient-to-br from-primary/30 via-background to-background"></div>
@endif
{{-- Legibility scrim over the photo (decorative). --}}
<div aria-hidden="true" class="pointer-events-none absolute inset-0 -z-10 bg-gradient-to-t from-background/90 via-background/40 to-transparent"></div>
<figcaption class="relative z-10 flex flex-col items-start">
<x-ui.badge variant="outline" class="uppercase tracking-wide">{{ __($label) }}</x-ui.badge>
<p class="mt-6 max-w-4xl text-balance text-3xl font-bold leading-[1.02] tracking-tight sm:mt-8 sm:text-5xl lg:text-7xl">{{ __($title) }}</p>
<div class="mt-6 flex items-center gap-4 text-base font-semibold sm:mt-8 sm:text-xl">
@if ($logo)
<img src="{{ $logo }}" alt="" class="size-9 rounded-md object-contain" />
@else
<span class="size-9 rounded-md bg-primary" aria-hidden="true"></span>
@endif
<span class="text-muted-foreground">{{ __($brand) }}</span>
</div>
</figcaption>
</figure>
Installation
php artisan ui:add blocks/og-image-photo
Registry contract
Install confidence
php artisan ui:add blocks/og-image-photo
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-photo.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 Photo (`og-image-photo`)
A full-bleed photo Open Graph card with a token scrim, a bottom-aligned outline label badge, large title and 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-photo
```
## Render it
```blade
<x-blocks.og-image-photo />
```
## Props
- `label` (string, default `Field notes`) — Label badge shown above the title.
- `title` (string, default `Designing in the open, one card at a time`) — Large title anchored to the bottom of the photo.
- `brand` (string, default `ogimagecn`) — Brand wordmark shown next to the logo mark.
- `image` (mixed|null, default `null`) — Background photo URL; falls back to a token gradient when null.
- `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 photo social card with a legibility scrim, a bottom-aligned label badge, title and brand mark.
- Suited to pages that have a strong photograph or hero image to showcase behind the title, falling back to a token gradient when no image is supplied.
## Avoid when
- Avoid when there is no photo to show or a flat token background is preferred; use og-image-simple (simple) or og-image-logo (logo) instead.
## Rules
- Render the installed block with `<x-blocks.og-image-photo />` 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-photo
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/og-image-photo.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 photo social card with a legibility scrim, a bottom-aligned label badge, title and brand mark.
- Suited to pages that have a strong photograph or hero image to showcase behind the title, falling back to a token gradient when no image is supplied.
Avoid when
- Avoid when there is no photo to show or a flat token background is preferred; use og-image-simple (simple) or og-image-logo (logo) 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-photo />
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([
'label' => 'Field notes',
'title' => 'Designing in the open, one card at a time',
'brand' => 'ogimagecn',
'image' => null,
'logo' => null,
])
{{--
Open Graph card — "Photo". A full-bleed 1200×630 photo card with a bottom-aligned
label badge, large title and brand mark. Adapted from ogimagecn.com to our system:
the background image is an absolutely-positioned <img> (default null falls back to a
token gradient layer), the dark legibility scrim is a token gradient, and the accent
maps to the `primary` token. 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="photo"
{{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full flex-col justify-end overflow-hidden rounded-lg border border-border bg-background p-10 text-foreground sm:p-16 lg:p-20']) }}
>
@if ($image)
<img src="{{ $image }}" alt="" class="absolute inset-0 -z-10 size-full object-cover" />
@else
<div aria-hidden="true" class="absolute inset-0 -z-10 size-full bg-gradient-to-br from-primary/30 via-background to-background"></div>
@endif
{{-- Legibility scrim over the photo (decorative). --}}
<div aria-hidden="true" class="pointer-events-none absolute inset-0 -z-10 bg-gradient-to-t from-background/90 via-background/40 to-transparent"></div>
<figcaption class="relative z-10 flex flex-col items-start">
<x-ui.badge variant="outline" class="uppercase tracking-wide">{{ __($label) }}</x-ui.badge>
<p class="mt-6 max-w-4xl text-balance text-3xl font-bold leading-[1.02] tracking-tight sm:mt-8 sm:text-5xl lg:text-7xl">{{ __($title) }}</p>
<div class="mt-6 flex items-center gap-4 text-base font-semibold sm:mt-8 sm:text-xl">
@if ($logo)
<img src="{{ $logo }}" alt="" class="size-9 rounded-md object-contain" />
@else
<span class="size-9 rounded-md bg-primary" aria-hidden="true"></span>
@endif
<span class="text-muted-foreground">{{ __($brand) }}</span>
</div>
</figcaption>
</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