OG Image
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
@props([
'brand' => 'Acme',
'title' => 'Notes on building durable software',
'logo' => null,
])
{{--
Open Graph card — "Shiori". A clean, minimal card with a circular logo at the
top-start and a bottom row pairing the brand with an article title. Adapted
from ogimagecn.com: the original raw-colour `background`/`brandColor`/
`titleColor` props are dropped in favour of the `card` surface tokens, the
brand sits in the `primary` accent, and the circular logo (with fallback) 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
$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="shiori"
{{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full flex-col overflow-hidden rounded-lg border border-border bg-card p-10 text-card-foreground sm:p-14 lg:p-20']) }}
>
<x-ui.avatar size="xl" shape="circle" :src="$logo" :alt="$brand" :fallback="$initials" />
<figcaption class="absolute inset-x-10 bottom-10 flex items-end justify-between gap-6 sm:inset-x-14 sm:bottom-14 lg:inset-x-20 lg:bottom-20">
<p class="flex-[0.25] text-balance text-2xl font-semibold leading-[1.1] tracking-tight text-primary sm:text-4xl lg:text-6xl">{{ __($brand) }}</p>
<p class="flex-[0.6] text-balance text-end text-2xl font-semibold leading-[1.1] tracking-tight text-muted-foreground sm:text-4xl lg:text-6xl">{{ __($title) }}</p>
</figcaption>
</figure>
Installation
php artisan ui:add blocks/og-image-shiori
Registry contract
Install confidence
php artisan ui:add blocks/og-image-shiori
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-shiori.blade.php |
Registry dependencies
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.
# Brok UI block: OG Shiori (`og-image-shiori`)
A clean, minimal Open Graph card with a circular logo and a bottom row pairing the brand with an article title.
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-shiori
```
## Render it
```blade
<x-blocks.og-image-shiori />
```
## Props
- `brand` (string, default `Acme`) — Brand name shown at the bottom-start beside the title.
- `title` (string, default `Notes on building durable software`) — Article title shown at the bottom-end.
- `logo` (mixed|null, default `null`) — Optional logo image URL; falls back to initials when null.
## Use when
- Use for a clean, minimal social card with a circular logo mark up top and a bottom row pairing the brand name against an article title.
- Suited to a compact, brand-forward article card where the title reads as a caption beside the brand rather than as a large standalone headline.
## Avoid when
- Avoid when the title needs to be the dominant large headline; use og-image-simple (simple) or og-image-blog (blog) instead.
## Rules
- Render the installed block with `<x-blocks.og-image-shiori />` 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-shiori
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/og-image-shiori.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 clean, minimal social card with a circular logo mark up top and a bottom row pairing the brand name against an article title.
- Suited to a compact, brand-forward article card where the title reads as a caption beside the brand rather than as a large standalone headline.
Avoid when
- Avoid when the title needs to be the dominant large headline; use og-image-simple (simple) or 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
Usage
Render the block as a component, passing data where useful:
<x-blocks.og-image-shiori />
Built from primitives
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.
@props([
'brand' => 'Acme',
'title' => 'Notes on building durable software',
'logo' => null,
])
{{--
Open Graph card — "Shiori". A clean, minimal card with a circular logo at the
top-start and a bottom row pairing the brand with an article title. Adapted
from ogimagecn.com: the original raw-colour `background`/`brandColor`/
`titleColor` props are dropped in favour of the `card` surface tokens, the
brand sits in the `primary` accent, and the circular logo (with fallback) 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
$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="shiori"
{{ $attributes->merge(['class' => 'relative isolate flex aspect-[1200/630] w-full flex-col overflow-hidden rounded-lg border border-border bg-card p-10 text-card-foreground sm:p-14 lg:p-20']) }}
>
<x-ui.avatar size="xl" shape="circle" :src="$logo" :alt="$brand" :fallback="$initials" />
<figcaption class="absolute inset-x-10 bottom-10 flex items-end justify-between gap-6 sm:inset-x-14 sm:bottom-14 lg:inset-x-20 lg:bottom-20">
<p class="flex-[0.25] text-balance text-2xl font-semibold leading-[1.1] tracking-tight text-primary sm:text-4xl lg:text-6xl">{{ __($brand) }}</p>
<p class="flex-[0.6] text-balance text-end text-2xl font-semibold leading-[1.1] tracking-tight text-muted-foreground sm:text-4xl lg:text-6xl">{{ __($title) }}</p>
</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