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

16 of 16

resources/views/blocks/og-image-owner.blade.php Blade
@props([
    'eyebrow' => 'A studio for',
    'title' => 'designers who ship.',
    'brand' => 'Acme',
    'logo' => null,
    'images' => [null, null, null],
])

{{--
    Open Graph card — "Owner". A light card with an eyebrow + bold headline at the
    top-start, a brand mark at the top-end, and a bottom row of three photos (the
    middle one taller, rounded only on its top corners). Adapted from
    ogimagecn.com: the off-white/ink raw colours map to the `muted`/`card` surface
    tokens, missing photos fall back to a token placeholder, and the brand chip is
    composed from `<x-ui.avatar>`. Render it inside a 1200×630 viewport in your OG
    image route (e.g. a Browsershot screenshot) for pixel-accurate social cards.
--}}
@php
    $photos = array_slice(array_pad((array) $images, 3, null), 0, 3);
    $initials = collect(preg_split('/\s+/', trim($brand)))
        ->filter()
        ->map(fn ($word) => mb_strtoupper(mb_substr($word, 0, 1)))
        ->take(2)
        ->implode('');
@endphp
<figure
    data-slot="og-image"
    data-variant="owner"
    {{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full overflow-hidden rounded-md border border-border bg-muted p-2 text-foreground']) }}
>
    <div class="relative flex w-full flex-col overflow-hidden rounded-[3.5rem] bg-card p-8 text-card-foreground sm:p-10 lg:p-12">
        <figcaption class="max-w-[66%]">
            <p class="text-xl font-semibold leading-[1.05] tracking-tight text-muted-foreground sm:text-3xl lg:text-6xl">{{ __($eyebrow) }}</p>
            <p class="text-balance text-xl font-semibold leading-[1.05] tracking-tight sm:text-3xl lg:text-6xl">{{ __($title) }}</p>
        </figcaption>

        {{-- Brand mark, top-end. --}}
        <div class="absolute end-6 top-6 flex items-center gap-2 sm:end-9 sm:top-9">
            <x-ui.avatar size="sm" shape="rounded" :src="$logo" :alt="$brand" :fallback="$initials" />
            <span class="text-sm font-semibold tracking-tight sm:text-lg lg:text-2xl">{{ __($brand) }}</span>
        </div>

        {{-- Bottom photo row. --}}
        <div class="absolute inset-x-8 bottom-0 flex items-end gap-4 sm:inset-x-10 sm:gap-4 lg:inset-x-12" aria-hidden="true">
            @foreach ($photos as $i => $src)
                <div class="flex flex-1 overflow-hidden rounded-t-lg {{ $i === 1 ? 'h-44 sm:h-60 lg:h-72' : 'h-36 sm:h-52 lg:h-60' }}">
                    @if ($src)
                        <img src="{{ $src }}" alt="" class="size-full object-cover" />
                    @else
                        <div class="size-full bg-muted-foreground/15"></div>
                    @endif
                </div>
            @endforeach
        </div>
    </div>
</figure>

Installation

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

Installs these dependencies automatically:

Registry contract

Install confidence

php artisan ui:add blocks/og-image-owner 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-owner.blade.php

Registry dependencies

avatar

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-owner.md
# Brok UI block: OG Owner (`og-image-owner`)

A light Open Graph card with an eyebrow and bold headline, a brand mark, and a bottom row of three photos.

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-owner
```

## Render it

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

## Props

- `eyebrow` (string, default `A studio for`) — Small line shown above the headline.
- `title` (string, default `designers who ship.`) — Bold headline under the eyebrow.
- `brand` (string, default `Acme`) — Brand name shown beside the logo mark, top-end.
- `logo` (mixed|null, default `null`) — Optional logo image URL; falls back to initials when null.
- `images` (array, default `[null, null, null]`) — Up to three photo URLs for the bottom row; missing entries fall back to a token placeholder.

## Use when

- Use for a light card framed in a rounded outer border, pairing an eyebrow and bold headline top-start with a brand mark top-end and a row of three photos along the bottom.
- Suited to studio, agency or team pages that want to show a small gallery of photos alongside a short statement.

## Avoid when

- Avoid when there are no photos to show or a single portrait fits better; use og-image-profile (profile) or og-image-simple (simple) instead.

## Rules

- Render the installed block with `<x-blocks.og-image-owner />` 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-owner
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/og-image-owner.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 light card framed in a rounded outer border, pairing an eyebrow and bold headline top-start with a brand mark top-end and a row of three photos along the bottom.
  • Suited to studio, agency or team pages that want to show a small gallery of photos alongside a short statement.

Avoid when

  • Avoid when there are no photos to show or a single portrait fits better; use og-image-profile (profile) or og-image-simple (simple) instead.

Anti-patterns

  • Do not replace semantic props with conflicting utility classes.
  • Do not remove labels, focus styles, or state attributes.
Anatomy
figure root rounded frame eyebrow headline brand mark photo row

Usage

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

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

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-owner.blade.php Blade
@props([
    'eyebrow' => 'A studio for',
    'title' => 'designers who ship.',
    'brand' => 'Acme',
    'logo' => null,
    'images' => [null, null, null],
])

{{--
    Open Graph card — "Owner". A light card with an eyebrow + bold headline at the
    top-start, a brand mark at the top-end, and a bottom row of three photos (the
    middle one taller, rounded only on its top corners). Adapted from
    ogimagecn.com: the off-white/ink raw colours map to the `muted`/`card` surface
    tokens, missing photos fall back to a token placeholder, and the brand chip is
    composed from `<x-ui.avatar>`. Render it inside a 1200×630 viewport in your OG
    image route (e.g. a Browsershot screenshot) for pixel-accurate social cards.
--}}
@php
    $photos = array_slice(array_pad((array) $images, 3, null), 0, 3);
    $initials = collect(preg_split('/\s+/', trim($brand)))
        ->filter()
        ->map(fn ($word) => mb_strtoupper(mb_substr($word, 0, 1)))
        ->take(2)
        ->implode('');
@endphp
<figure
    data-slot="og-image"
    data-variant="owner"
    {{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full overflow-hidden rounded-md border border-border bg-muted p-2 text-foreground']) }}
>
    <div class="relative flex w-full flex-col overflow-hidden rounded-[3.5rem] bg-card p-8 text-card-foreground sm:p-10 lg:p-12">
        <figcaption class="max-w-[66%]">
            <p class="text-xl font-semibold leading-[1.05] tracking-tight text-muted-foreground sm:text-3xl lg:text-6xl">{{ __($eyebrow) }}</p>
            <p class="text-balance text-xl font-semibold leading-[1.05] tracking-tight sm:text-3xl lg:text-6xl">{{ __($title) }}</p>
        </figcaption>

        {{-- Brand mark, top-end. --}}
        <div class="absolute end-6 top-6 flex items-center gap-2 sm:end-9 sm:top-9">
            <x-ui.avatar size="sm" shape="rounded" :src="$logo" :alt="$brand" :fallback="$initials" />
            <span class="text-sm font-semibold tracking-tight sm:text-lg lg:text-2xl">{{ __($brand) }}</span>
        </div>

        {{-- Bottom photo row. --}}
        <div class="absolute inset-x-8 bottom-0 flex items-end gap-4 sm:inset-x-10 sm:gap-4 lg:inset-x-12" aria-hidden="true">
            @foreach ($photos as $i => $src)
                <div class="flex flex-1 overflow-hidden rounded-t-lg {{ $i === 1 ? 'h-44 sm:h-60 lg:h-72' : 'h-36 sm:h-52 lg:h-60' }}">
                    @if ($src)
                        <img src="{{ $src }}" alt="" class="size-full object-cover" />
                    @else
                        <div class="size-full bg-muted-foreground/15"></div>
                    @endif
                </div>
            @endforeach
        </div>
    </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