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

14 of 16

resources/views/blocks/og-image-showcase.blade.php Blade
@props([
    'title' => 'Track every metric that matters',
    'subtitle' => 'A real-time analytics dashboard built for teams that move fast.',
    'url' => 'app.example.com',
])

{{--
    Open Graph card — "Showcase". A centered headline + subtitle over a faux
    browser window (rounded only on its top corners, sitting flush at the bottom)
    that previews an analytics dashboard. Adapted from ogimagecn.com: the indigo
    accent maps to the `primary` token, the traffic-light dots map to the
    destructive/warning/success tokens, the radial glow becomes a blurred token
    overlay, and the URL pill is composed from `<x-ui.badge>`. The original raw
    `accent` colour prop is dropped in favour of 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="showcase"
    {{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full flex-col items-center overflow-hidden rounded-lg border border-border bg-background pt-8 text-center text-foreground sm:pt-12 lg:pt-16']) }}
>
    {{-- Accent glow rising from the top edge (decorative). --}}
    <div aria-hidden="true" class="pointer-events-none absolute inset-x-0 -top-1/3 -z-10 mx-auto h-2/3 w-2/3 rounded-full bg-primary/20 blur-3xl"></div>

    <figcaption class="flex flex-col items-center px-8">
        <p class="max-w-3xl text-balance text-2xl font-bold leading-[1.05] tracking-tight sm:text-4xl lg:text-6xl">{{ __($title) }}</p>
        <p class="mt-4 max-w-2xl text-pretty text-sm text-muted-foreground sm:mt-4 sm:text-lg lg:text-2xl">{{ __($subtitle) }}</p>
    </figcaption>

    {{-- Faux browser window, flush to the bottom edge. --}}
    <div class="mt-8 flex w-[83%] flex-1 flex-col overflow-hidden rounded-t-lg border border-b-0 border-border bg-card text-start shadow-2xl shadow-primary/20 sm:mt-10 lg:mt-12">
        {{-- Window top bar. --}}
        <div class="flex items-center gap-2 border-b border-border px-4 py-4 sm:px-6 sm:py-4">
            <span class="size-2 rounded-full bg-destructive sm:size-3" aria-hidden="true"></span>
            <span class="size-2 rounded-full bg-warning sm:size-3" aria-hidden="true"></span>
            <span class="size-2 rounded-full bg-success sm:size-3" aria-hidden="true"></span>
            <x-ui.badge variant="secondary" class="ms-4 font-normal tracking-wide">{{ __($url) }}</x-ui.badge>
        </div>

        {{-- Window body: sidebar + main panel. --}}
        <div class="flex flex-1">
            <div class="flex w-1/5 flex-col gap-4 border-e border-border p-4 sm:gap-4 sm:p-6">
                <span class="h-3 w-[90%] rounded bg-primary sm:h-4" aria-hidden="true"></span>
                <span class="h-3 w-[60%] rounded bg-muted-foreground/20 sm:h-4" aria-hidden="true"></span>
                <span class="h-3 w-[70%] rounded bg-muted-foreground/20 sm:h-4" aria-hidden="true"></span>
                <span class="h-3 w-1/2 rounded bg-muted-foreground/20 sm:h-4" aria-hidden="true"></span>
            </div>

            <div class="flex flex-1 flex-col p-4 sm:p-6 lg:p-8">
                <p class="text-xs text-muted-foreground sm:text-base lg:text-xl">{{ __('Revenue') }}</p>
                <p class="mt-2 text-2xl font-bold tracking-tight sm:text-4xl lg:text-5xl">{{ __('$346,723') }}</p>
                <div class="mt-4 flex flex-1 items-end gap-2 sm:mt-6 sm:gap-4 lg:gap-4" aria-hidden="true">
                    <span class="h-2/5 flex-1 rounded-t bg-primary"></span>
                    <span class="h-[65%] flex-1 rounded-t bg-muted-foreground/25"></span>
                    <span class="h-1/2 flex-1 rounded-t bg-primary"></span>
                    <span class="h-4/5 flex-1 rounded-t bg-muted-foreground/25"></span>
                    <span class="h-[55%] flex-1 rounded-t bg-primary"></span>
                    <span class="h-[95%] flex-1 rounded-t bg-muted-foreground/25"></span>
                    <span class="h-[70%] flex-1 rounded-t bg-primary"></span>
                    <span class="h-[85%] flex-1 rounded-t bg-muted-foreground/25"></span>
                </div>
            </div>
        </div>
    </div>
</figure>

Installation

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

Installs these dependencies automatically:

Registry contract

Install confidence

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

An Open Graph card with a centered headline and subtitle over a faux browser window previewing an analytics dashboard.

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

## Render it

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

## Props

- `title` (string, default `Track every metric that matters`) — Centered headline above the browser mock.
- `subtitle` (string, default `A real-time analytics dashboard built for teams that move fast.`) — Supporting copy under the headline.
- `url` (string, default `app.example.com`) — URL shown inside the browser window's address pill.

## Use when

- Use for a social card that pairs a centered headline and subtitle with a faux browser window previewing an analytics dashboard mock below.
- Suited to SaaS or app landing pages that want to show product UI, not just typography, inside the social card.

## Avoid when

- Avoid when there is no product UI to mock up, or a simpler typographic card is preferred; use og-image-simple (simple) or og-image-product (product) instead.

## Rules

- Render the installed block with `<x-blocks.og-image-showcase />` 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-showcase
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/og-image-showcase.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 social card that pairs a centered headline and subtitle with a faux browser window previewing an analytics dashboard mock below.
  • Suited to SaaS or app landing pages that want to show product UI, not just typography, inside the social card.

Avoid when

  • Avoid when there is no product UI to mock up, or a simpler typographic card is preferred; use og-image-simple (simple) or og-image-product (product) instead.

Anti-patterns

  • Do not replace semantic props with conflicting utility classes.
  • Do not remove labels, focus styles, or state attributes.
Anatomy
figure root headline subtitle browser window chrome url badge dashboard sidebar dashboard chart

Usage

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

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

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-showcase.blade.php Blade
@props([
    'title' => 'Track every metric that matters',
    'subtitle' => 'A real-time analytics dashboard built for teams that move fast.',
    'url' => 'app.example.com',
])

{{--
    Open Graph card — "Showcase". A centered headline + subtitle over a faux
    browser window (rounded only on its top corners, sitting flush at the bottom)
    that previews an analytics dashboard. Adapted from ogimagecn.com: the indigo
    accent maps to the `primary` token, the traffic-light dots map to the
    destructive/warning/success tokens, the radial glow becomes a blurred token
    overlay, and the URL pill is composed from `<x-ui.badge>`. The original raw
    `accent` colour prop is dropped in favour of 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="showcase"
    {{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full flex-col items-center overflow-hidden rounded-lg border border-border bg-background pt-8 text-center text-foreground sm:pt-12 lg:pt-16']) }}
>
    {{-- Accent glow rising from the top edge (decorative). --}}
    <div aria-hidden="true" class="pointer-events-none absolute inset-x-0 -top-1/3 -z-10 mx-auto h-2/3 w-2/3 rounded-full bg-primary/20 blur-3xl"></div>

    <figcaption class="flex flex-col items-center px-8">
        <p class="max-w-3xl text-balance text-2xl font-bold leading-[1.05] tracking-tight sm:text-4xl lg:text-6xl">{{ __($title) }}</p>
        <p class="mt-4 max-w-2xl text-pretty text-sm text-muted-foreground sm:mt-4 sm:text-lg lg:text-2xl">{{ __($subtitle) }}</p>
    </figcaption>

    {{-- Faux browser window, flush to the bottom edge. --}}
    <div class="mt-8 flex w-[83%] flex-1 flex-col overflow-hidden rounded-t-lg border border-b-0 border-border bg-card text-start shadow-2xl shadow-primary/20 sm:mt-10 lg:mt-12">
        {{-- Window top bar. --}}
        <div class="flex items-center gap-2 border-b border-border px-4 py-4 sm:px-6 sm:py-4">
            <span class="size-2 rounded-full bg-destructive sm:size-3" aria-hidden="true"></span>
            <span class="size-2 rounded-full bg-warning sm:size-3" aria-hidden="true"></span>
            <span class="size-2 rounded-full bg-success sm:size-3" aria-hidden="true"></span>
            <x-ui.badge variant="secondary" class="ms-4 font-normal tracking-wide">{{ __($url) }}</x-ui.badge>
        </div>

        {{-- Window body: sidebar + main panel. --}}
        <div class="flex flex-1">
            <div class="flex w-1/5 flex-col gap-4 border-e border-border p-4 sm:gap-4 sm:p-6">
                <span class="h-3 w-[90%] rounded bg-primary sm:h-4" aria-hidden="true"></span>
                <span class="h-3 w-[60%] rounded bg-muted-foreground/20 sm:h-4" aria-hidden="true"></span>
                <span class="h-3 w-[70%] rounded bg-muted-foreground/20 sm:h-4" aria-hidden="true"></span>
                <span class="h-3 w-1/2 rounded bg-muted-foreground/20 sm:h-4" aria-hidden="true"></span>
            </div>

            <div class="flex flex-1 flex-col p-4 sm:p-6 lg:p-8">
                <p class="text-xs text-muted-foreground sm:text-base lg:text-xl">{{ __('Revenue') }}</p>
                <p class="mt-2 text-2xl font-bold tracking-tight sm:text-4xl lg:text-5xl">{{ __('$346,723') }}</p>
                <div class="mt-4 flex flex-1 items-end gap-2 sm:mt-6 sm:gap-4 lg:gap-4" aria-hidden="true">
                    <span class="h-2/5 flex-1 rounded-t bg-primary"></span>
                    <span class="h-[65%] flex-1 rounded-t bg-muted-foreground/25"></span>
                    <span class="h-1/2 flex-1 rounded-t bg-primary"></span>
                    <span class="h-4/5 flex-1 rounded-t bg-muted-foreground/25"></span>
                    <span class="h-[55%] flex-1 rounded-t bg-primary"></span>
                    <span class="h-[95%] flex-1 rounded-t bg-muted-foreground/25"></span>
                    <span class="h-[70%] flex-1 rounded-t bg-primary"></span>
                    <span class="h-[85%] flex-1 rounded-t bg-muted-foreground/25"></span>
                </div>
            </div>
        </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