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

11 of 16

resources/views/blocks/og-image-logo.blade.php Blade
@props([
    'brand' => 'ogimagecn',
    'tagline' => 'Token-themed social cards',
    'monogram' => 'OG',
    'background' => null,
    'logo' => null,
])

{{--
    Open Graph card — "Logo". A centered brand card on a soft gradient field,
    1200×630. Shows a large logo tile (or a monogram square) above a big
    wordmark and a tagline pill. Adapted from ogimagecn.com to our system: the
    violet accent maps to the `primary` token, the radial gradient glow becomes
    a blurred `primary` token overlay, and the card follows the active theme.
    The original `background` prop is kept but defaults to null — we use
    `bg-background` plus the token glow rather than interpolating a raw colour.
    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="logo"
    {{ $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']) }}
>
    {{-- Radial-feel accent glow centred behind the brand (decorative). --}}
    <div aria-hidden="true" class="pointer-events-none absolute inset-0 -z-10 m-auto size-2/3 rounded-full bg-primary/20 blur-3xl"></div>

    @if ($logo)
        <img src="{{ $logo }}" alt="" class="size-20 rounded-lg object-contain shadow-lg sm:size-28 lg:size-36" />
    @else
        <span
            class="flex size-20 items-center justify-center rounded-lg bg-primary text-3xl font-bold text-primary-foreground shadow-lg sm:size-28 sm:text-5xl lg:size-36 lg:text-7xl"
            aria-hidden="true"
        >{{ __($monogram) }}</span>
    @endif

    <figcaption class="mt-8 flex flex-col items-center sm:mt-10 lg:mt-12">
        <p class="text-balance text-4xl font-bold leading-[1.05] tracking-tight sm:text-6xl lg:text-8xl">{{ __($brand) }}</p>
        @if ($tagline)
            <x-ui.badge variant="outline" class="mt-4 sm:mt-6">{{ __($tagline) }}</x-ui.badge>
        @endif
    </figcaption>
</figure>

Installation

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

Installs these dependencies automatically:

Registry contract

Install confidence

php artisan ui:add blocks/og-image-logo 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-logo.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-logo.md
# Brok UI block: OG Logo (`og-image-logo`)

A centered brand Open Graph card with a large logo or monogram tile, a wordmark and a tagline pill on a soft token gradient field.

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

## Render it

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

## Props

- `brand` (string, default `ogimagecn`) — Wordmark shown under the logo tile.
- `tagline` (string, default `Token-themed social cards`) — Tagline shown inside the outline badge; falsy hides it.
- `monogram` (string, default `OG`) — Fallback monogram text shown when no logo image is supplied.
- `background` (mixed|null, default `null`) — Reserved for a custom background; unused by default in favour of the token glow.
- `logo` (mixed|null, default `null`) — Optional logo image URL; falls back to the monogram tile when null.

## Use when

- Use for a centered brand-only social card showing a large logo tile, or monogram, above a wordmark and tagline pill on a soft gradient field.
- Suited to a generic homepage or brand-level Open Graph image that has no specific headline, article or product to feature.

## Avoid when

- Avoid when a headline or article title needs to be featured; use og-image-simple (simple) or og-image-terminal (terminal) instead.

## Rules

- Render the installed block with `<x-blocks.og-image-logo />` 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-logo
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/og-image-logo.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 centered brand-only social card showing a large logo tile, or monogram, above a wordmark and tagline pill on a soft gradient field.
  • Suited to a generic homepage or brand-level Open Graph image that has no specific headline, article or product to feature.

Avoid when

  • Avoid when a headline or article title needs to be featured; use og-image-simple (simple) or og-image-terminal (terminal) 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 logo tile or monogram wordmark tagline badge

Usage

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

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

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-logo.blade.php Blade
@props([
    'brand' => 'ogimagecn',
    'tagline' => 'Token-themed social cards',
    'monogram' => 'OG',
    'background' => null,
    'logo' => null,
])

{{--
    Open Graph card — "Logo". A centered brand card on a soft gradient field,
    1200×630. Shows a large logo tile (or a monogram square) above a big
    wordmark and a tagline pill. Adapted from ogimagecn.com to our system: the
    violet accent maps to the `primary` token, the radial gradient glow becomes
    a blurred `primary` token overlay, and the card follows the active theme.
    The original `background` prop is kept but defaults to null — we use
    `bg-background` plus the token glow rather than interpolating a raw colour.
    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="logo"
    {{ $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']) }}
>
    {{-- Radial-feel accent glow centred behind the brand (decorative). --}}
    <div aria-hidden="true" class="pointer-events-none absolute inset-0 -z-10 m-auto size-2/3 rounded-full bg-primary/20 blur-3xl"></div>

    @if ($logo)
        <img src="{{ $logo }}" alt="" class="size-20 rounded-lg object-contain shadow-lg sm:size-28 lg:size-36" />
    @else
        <span
            class="flex size-20 items-center justify-center rounded-lg bg-primary text-3xl font-bold text-primary-foreground shadow-lg sm:size-28 sm:text-5xl lg:size-36 lg:text-7xl"
            aria-hidden="true"
        >{{ __($monogram) }}</span>
    @endif

    <figcaption class="mt-8 flex flex-col items-center sm:mt-10 lg:mt-12">
        <p class="text-balance text-4xl font-bold leading-[1.05] tracking-tight sm:text-6xl lg:text-8xl">{{ __($brand) }}</p>
        @if ($tagline)
            <x-ui.badge variant="outline" class="mt-4 sm:mt-6">{{ __($tagline) }}</x-ui.badge>
        @endif
    </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