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

9 of 16

resources/views/blocks/og-image-event.blade.php Blade
@props([
    'label' => 'Live Event',
    'brand' => 'ogimagecn',
    'title' => 'Launch Week: the future of social cards',
    'date' => 'Mar 14, 2025',
    'location' => 'San Francisco, CA',
    'logo' => null,
])

{{--
    Open Graph card — "Event". A dark 1200×630 launch/event card: a dotted label
    badge and brand mark in the top row, a large title, and a date/location footer
    with a calendar icon. Adapted from ogimagecn.com to our system — the amber
    accent maps to the `warning` token, the radial glow becomes a blurred token
    overlay, 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.
--}}
<figure
    data-slot="og-image"
    data-variant="event"
    {{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full flex-col justify-between overflow-hidden rounded-lg border border-border bg-background p-8 text-foreground sm:p-12 lg:p-20']) }}
>
    {{-- Amber accent glow from the top-end corner (decorative). --}}
    <div aria-hidden="true" class="pointer-events-none absolute -top-1/3 -end-1/4 -z-10 h-2/3 w-2/3 rounded-full bg-warning/20 blur-3xl"></div>

    <div class="flex items-center justify-between gap-4">
        <x-ui.badge variant="warning" class="uppercase tracking-wide">
            <span class="size-2 rounded-full bg-warning" aria-hidden="true"></span>
            {{ __($label) }}
        </x-ui.badge>

        <div class="flex items-center gap-4 text-sm font-semibold text-muted-foreground sm:text-base lg:text-xl">
            @if ($logo)
                <img src="{{ $logo }}" alt="" class="size-7 rounded-md object-contain sm:size-9" />
            @else
                <span class="size-7 rounded-md bg-warning sm:size-9" aria-hidden="true"></span>
            @endif
            {{ __($brand) }}
        </div>
    </div>

    <figcaption>
        <p class="max-w-4xl text-balance text-3xl font-bold leading-[1.02] tracking-tight sm:text-5xl lg:text-7xl">{{ __($title) }}</p>
    </figcaption>

    <div class="flex items-center gap-4 text-sm font-semibold sm:text-lg lg:text-2xl">
        <span class="flex items-center gap-4 text-foreground">
            <svg class="size-5 text-warning sm:size-7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" aria-hidden="true">
                <rect x="3" y="4" width="18" height="18" rx="2" />
                <path d="M16 2v4M8 2v4M3 10h18" />
            </svg>
            {{ __($date) }}
        </span>
        <span class="text-muted-foreground">{{ __($location) }}</span>
    </div>
</figure>

Installation

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

Installs these dependencies automatically:

Registry contract

Install confidence

php artisan ui:add blocks/og-image-event 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.4
License
open
Stability
stable
Contract
v1
Foundation
≥ 1.0.0
Type Generated target
blade resources/views/blocks/og-image-event.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-event.md
# Brok UI block: OG Event (`og-image-event`)

A dark Open Graph launch/event card with a dotted label badge, brand mark, large title and a date/location footer.

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

## Render it

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

## Props

- `label` (string, default `Live Event`) — Label badge shown at the top, e.g. "Live Event".
- `brand` (string, default `ogimagecn`) — Brand name shown beside the logo mark in the top row.
- `title` (string, default `Launch Week: the future of social cards`) — Large event headline.
- `date` (string, default `Mar 14, 2025`) — Date shown in the footer beside the calendar icon.
- `location` (string, default `San Francisco, CA`) — Location shown in the footer.
- `logo` (mixed|null, default `null`) — Optional logo image URL; falls back to a solid token square when null.

## Use when

- Use for a dark launch or event card with a dotted label badge and brand mark up top, a large title, and a date/location footer.
- Suited to event pages, webinars or launch-week announcements that need to communicate when and where alongside the headline.

## Avoid when

- Avoid when there is no date or location to show; use og-image-simple (simple) or og-image-terminal (terminal) instead.

## Rules

- Render the installed block with `<x-blocks.og-image-event />` 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-event
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/og-image-event.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 launch or event card with a dotted label badge and brand mark up top, a large title, and a date/location footer.
  • Suited to event pages, webinars or launch-week announcements that need to communicate when and where alongside the headline.

Avoid when

  • Avoid when there is no date or location to show; 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 label badge brand mark title date location

Usage

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

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

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-event.blade.php Blade
@props([
    'label' => 'Live Event',
    'brand' => 'ogimagecn',
    'title' => 'Launch Week: the future of social cards',
    'date' => 'Mar 14, 2025',
    'location' => 'San Francisco, CA',
    'logo' => null,
])

{{--
    Open Graph card — "Event". A dark 1200×630 launch/event card: a dotted label
    badge and brand mark in the top row, a large title, and a date/location footer
    with a calendar icon. Adapted from ogimagecn.com to our system — the amber
    accent maps to the `warning` token, the radial glow becomes a blurred token
    overlay, 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.
--}}
<figure
    data-slot="og-image"
    data-variant="event"
    {{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full flex-col justify-between overflow-hidden rounded-lg border border-border bg-background p-8 text-foreground sm:p-12 lg:p-20']) }}
>
    {{-- Amber accent glow from the top-end corner (decorative). --}}
    <div aria-hidden="true" class="pointer-events-none absolute -top-1/3 -end-1/4 -z-10 h-2/3 w-2/3 rounded-full bg-warning/20 blur-3xl"></div>

    <div class="flex items-center justify-between gap-4">
        <x-ui.badge variant="warning" class="uppercase tracking-wide">
            <span class="size-2 rounded-full bg-warning" aria-hidden="true"></span>
            {{ __($label) }}
        </x-ui.badge>

        <div class="flex items-center gap-4 text-sm font-semibold text-muted-foreground sm:text-base lg:text-xl">
            @if ($logo)
                <img src="{{ $logo }}" alt="" class="size-7 rounded-md object-contain sm:size-9" />
            @else
                <span class="size-7 rounded-md bg-warning sm:size-9" aria-hidden="true"></span>
            @endif
            {{ __($brand) }}
        </div>
    </div>

    <figcaption>
        <p class="max-w-4xl text-balance text-3xl font-bold leading-[1.02] tracking-tight sm:text-5xl lg:text-7xl">{{ __($title) }}</p>
    </figcaption>

    <div class="flex items-center gap-4 text-sm font-semibold sm:text-lg lg:text-2xl">
        <span class="flex items-center gap-4 text-foreground">
            <svg class="size-5 text-warning sm:size-7" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 24 24" aria-hidden="true">
                <rect x="3" y="4" width="18" height="18" rx="2" />
                <path d="M16 2v4M8 2v4M3 10h18" />
            </svg>
            {{ __($date) }}
        </span>
        <span class="text-muted-foreground">{{ __($location) }}</span>
    </div>
</figure>

Ownership & lifecycle

Owner, release state, review evidence and adoption for this item.
Owner
Platform UI (@JoshJML)
Current version
1.0.4
Status
Stable
License
open
Deprecation
Not deprecated
Contract
v1
Foundation
≥ 1.0.0