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

5 of 16

resources/views/blocks/og-image-quote.blade.php Blade
@props([
    'quote' => 'This is the cleanest way I have found to ship on-brand social cards straight from my Laravel app.',
    'author' => 'Avery Quinn',
    'handle' => '@averyquinn',
    'avatar' => null,
])

{{--
    Open Graph card — "Quote". A dark testimonial / tweet-style 1200×630 social card
    with a giant decorative opening quote mark, the quote as a <blockquote>, and an
    author row built from the avatar primitive. Adapted from ogimagecn.com to our
    system: the pink accent maps to the `primary` token 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.
--}}
@php
    $initials = collect(explode(' ', trim($author)))
        ->filter()
        ->map(fn ($part) => mb_substr($part, 0, 1))
        ->take(2)
        ->implode('');
    $initials = mb_strtoupper($initials);
@endphp

<figure
    data-slot="og-image"
    data-variant="quote"
    {{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full flex-col justify-center overflow-hidden rounded-lg border border-border bg-background p-10 text-foreground sm:p-16 lg:p-24']) }}
>
    {{-- Giant decorative opening quote mark (accent). --}}
    <span aria-hidden="true" class="block text-7xl font-bold leading-[0.6] text-primary sm:text-8xl lg:text-[9rem]">&ldquo;</span>

    <figcaption class="flex flex-col">
        <blockquote class="mt-2 max-w-4xl text-balance text-xl font-semibold leading-tight tracking-tight sm:text-3xl lg:text-5xl">
            {{ __($quote) }}
        </blockquote>

        <div class="mt-8 flex items-center gap-4 sm:mt-12 sm:gap-6">
            <x-ui.avatar size="xl" :src="$avatar" :fallback="$initials" :alt="$author" />
            <div class="flex flex-col">
                <span class="text-sm font-semibold sm:text-lg lg:text-xl">{{ __($author) }}</span>
                <span class="text-sm text-muted-foreground sm:text-lg lg:text-xl">{{ __($handle) }}</span>
            </div>
        </div>
    </figcaption>
</figure>

Installation

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

Installs these dependencies automatically:

Registry contract

Install confidence

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

A dark testimonial Open Graph card with a giant decorative quote mark, a blockquote and an author row composed from the avatar primitive.

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

## Render it

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

## Props

- `quote` (string, default `This is the cleanest way I have found to ship on-brand social cards straight from my Laravel app.`) — The quoted text rendered as a blockquote.
- `author` (string, default `Avery Quinn`) — Author name shown under the quote.
- `handle` (string, default `@averyquinn`) — Author handle or subtitle shown under the name.
- `avatar` (mixed|null, default `null`) — Optional author avatar image URL; falls back to initials when null.

## Use when

- Use for a dark testimonial or tweet-style social card built around a giant decorative quote mark and a blockquote with an author row.
- Suited to sharing customer quotes, reviews or tweet-style commentary rather than product or article content.

## Avoid when

- Avoid when the content is an article excerpt with a byline rather than a spoken quote; use og-image-blog (blog) instead.

## Rules

- Render the installed block with `<x-blocks.og-image-quote />` 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-quote
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/og-image-quote.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 dark testimonial or tweet-style social card built around a giant decorative quote mark and a blockquote with an author row.
  • Suited to sharing customer quotes, reviews or tweet-style commentary rather than product or article content.

Avoid when

  • Avoid when the content is an article excerpt with a byline rather than a spoken quote; use og-image-blog (blog) instead.

Anti-patterns

  • Do not replace semantic props with conflicting utility classes.
  • Do not remove labels, focus styles, or state attributes.
Anatomy
figure root decorative quote mark blockquote author avatar author handle

Usage

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

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

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-quote.blade.php Blade
@props([
    'quote' => 'This is the cleanest way I have found to ship on-brand social cards straight from my Laravel app.',
    'author' => 'Avery Quinn',
    'handle' => '@averyquinn',
    'avatar' => null,
])

{{--
    Open Graph card — "Quote". A dark testimonial / tweet-style 1200×630 social card
    with a giant decorative opening quote mark, the quote as a <blockquote>, and an
    author row built from the avatar primitive. Adapted from ogimagecn.com to our
    system: the pink accent maps to the `primary` token 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.
--}}
@php
    $initials = collect(explode(' ', trim($author)))
        ->filter()
        ->map(fn ($part) => mb_substr($part, 0, 1))
        ->take(2)
        ->implode('');
    $initials = mb_strtoupper($initials);
@endphp

<figure
    data-slot="og-image"
    data-variant="quote"
    {{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full flex-col justify-center overflow-hidden rounded-lg border border-border bg-background p-10 text-foreground sm:p-16 lg:p-24']) }}
>
    {{-- Giant decorative opening quote mark (accent). --}}
    <span aria-hidden="true" class="block text-7xl font-bold leading-[0.6] text-primary sm:text-8xl lg:text-[9rem]">&ldquo;</span>

    <figcaption class="flex flex-col">
        <blockquote class="mt-2 max-w-4xl text-balance text-xl font-semibold leading-tight tracking-tight sm:text-3xl lg:text-5xl">
            {{ __($quote) }}
        </blockquote>

        <div class="mt-8 flex items-center gap-4 sm:mt-12 sm:gap-6">
            <x-ui.avatar size="xl" :src="$avatar" :fallback="$initials" :alt="$author" />
            <div class="flex flex-col">
                <span class="text-sm font-semibold sm:text-lg lg:text-xl">{{ __($author) }}</span>
                <span class="text-sm text-muted-foreground sm:text-lg lg:text-xl">{{ __($handle) }}</span>
            </div>
        </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