Blog
Blog sections — a dashed list, a card grid (with an optional image panel), a magazine layout and a single-article post header.
Preview
@props([
'backLabel' => 'Back to blog',
'backHref' => '#',
'category' => 'Engineering',
'title' => 'Combining shadcn and Tailwind with your design system',
'readTime' => '5 min read',
'date' => 'Jun 17, 2026',
'authors' => null,
])
@php
// A single-article header: a back link, a category badge, a balanced title,
// a read-time + date meta row and a multi-author byline. Composes the badge
// and avatar primitives.
$authors ??= [
['name' => 'Rusty Adler', 'role' => 'Globe Trotter', 'fallback' => 'RA', 'src' => null],
['name' => 'Sarah Wilson', 'role' => 'Lead Designer', 'fallback' => 'SW', 'src' => null],
];
@endphp
<header {{ $attributes->merge(['class' => 'bg-background py-12 text-foreground sm:py-16']) }}>
<div class="mx-auto max-w-3xl px-4">
<a
href="{{ $backHref }}"
class="inline-flex items-center gap-2 rounded-sm text-sm font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
>
<svg class="size-4 shrink-0 rtl:-scale-x-100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="m12 19-7-7 7-7" /><path d="M19 12H5" />
</svg>
{{ __($backLabel) }}
</a>
@if ($category)
<x-ui.badge variant="secondary" class="mt-8">{{ __($category) }}</x-ui.badge>
@endif
<h1 class="mt-4 text-balance text-4xl font-bold tracking-tight text-foreground sm:text-5xl">
{{ __($title) }}
</h1>
<div class="mt-6 flex flex-wrap items-center gap-x-6 gap-y-2 text-sm text-muted-foreground">
@if ($readTime)
<span class="inline-flex items-center gap-2">
<svg class="size-4 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />
</svg>
{{ __($readTime) }}
</span>
@endif
@if ($date)
<span class="inline-flex items-center gap-2">
<svg class="size-4 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect width="18" height="18" x="3" y="4" rx="2" /><path d="M3 10h18M8 2v4M16 2v4" />
</svg>
{{ $date }}
</span>
@endif
</div>
@if (! empty($authors))
<div class="mt-8 flex flex-wrap items-center gap-x-8 gap-y-4">
@foreach ($authors as $author)
<div class="flex items-center gap-4">
<x-ui.avatar :src="$author['src'] ?? null" :fallback="$author['fallback'] ?? null" :alt="$author['name']" />
<div class="flex flex-col">
<span class="text-sm font-semibold text-foreground">{{ $author['name'] }}</span>
@if (! empty($author['role']))
<span class="text-xs text-muted-foreground">{{ __($author['role']) }}</span>
@endif
</div>
</div>
@endforeach
</div>
@endif
</div>
</header>
Installation
php artisan ui:add blocks/blog-post-header
Registry contract
Install confidence
php artisan ui:add blocks/blog-post-header
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/blog-post-header.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: Blog Post Header (`blog-post-header`)
A single-article header with a back link, category badge, balanced title, read-time and date meta, and a multi-author byline. Composes the badge and avatar primitives.
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/blog-post-header
```
## Render it
```blade
<x-blocks.blog-post-header />
```
## Props
- `back-label` (string, default `Back to blog`)
- `back-href` (string, default `#`)
- `category` (string, default `Engineering`)
- `title` (string, default `Combining shadcn and Tailwind with your design system`)
- `read-time` (string, default `5 min read`)
- `date` (string, default `Jun 17, 2026`)
- `authors` (mixed|null, default `null`)
## Use when
- Heading a single blog article with a back link, category badge, balanced title and read-time/date meta.
- Crediting more than one author with a multi-author byline row.
## Avoid when
- Use blog-editorial for a card-grid index rather than a single-article header.
## Rules
- Render the installed block with `<x-blocks.blog-post-header />` 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/blog-post-header
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/blog-post-header.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
- Heading a single blog article with a back link, category badge, balanced title and read-time/date meta.
- Crediting more than one author with a multi-author byline row.
Avoid when
- Use blog-editorial for a card-grid index rather than a single-article header.
Anti-patterns
- Do not replace semantic props with conflicting utility classes.
- Do not remove labels, focus styles, or state attributes.
Usage
Render the block as a component, passing data where useful:
<x-blocks.blog-post-header />
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([
'backLabel' => 'Back to blog',
'backHref' => '#',
'category' => 'Engineering',
'title' => 'Combining shadcn and Tailwind with your design system',
'readTime' => '5 min read',
'date' => 'Jun 17, 2026',
'authors' => null,
])
@php
// A single-article header: a back link, a category badge, a balanced title,
// a read-time + date meta row and a multi-author byline. Composes the badge
// and avatar primitives.
$authors ??= [
['name' => 'Rusty Adler', 'role' => 'Globe Trotter', 'fallback' => 'RA', 'src' => null],
['name' => 'Sarah Wilson', 'role' => 'Lead Designer', 'fallback' => 'SW', 'src' => null],
];
@endphp
<header {{ $attributes->merge(['class' => 'bg-background py-12 text-foreground sm:py-16']) }}>
<div class="mx-auto max-w-3xl px-4">
<a
href="{{ $backHref }}"
class="inline-flex items-center gap-2 rounded-sm text-sm font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
>
<svg class="size-4 shrink-0 rtl:-scale-x-100" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path d="m12 19-7-7 7-7" /><path d="M19 12H5" />
</svg>
{{ __($backLabel) }}
</a>
@if ($category)
<x-ui.badge variant="secondary" class="mt-8">{{ __($category) }}</x-ui.badge>
@endif
<h1 class="mt-4 text-balance text-4xl font-bold tracking-tight text-foreground sm:text-5xl">
{{ __($title) }}
</h1>
<div class="mt-6 flex flex-wrap items-center gap-x-6 gap-y-2 text-sm text-muted-foreground">
@if ($readTime)
<span class="inline-flex items-center gap-2">
<svg class="size-4 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<circle cx="12" cy="12" r="10" /><polyline points="12 6 12 12 16 14" />
</svg>
{{ __($readTime) }}
</span>
@endif
@if ($date)
<span class="inline-flex items-center gap-2">
<svg class="size-4 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<rect width="18" height="18" x="3" y="4" rx="2" /><path d="M3 10h18M8 2v4M16 2v4" />
</svg>
{{ $date }}
</span>
@endif
</div>
@if (! empty($authors))
<div class="mt-8 flex flex-wrap items-center gap-x-8 gap-y-4">
@foreach ($authors as $author)
<div class="flex items-center gap-4">
<x-ui.avatar :src="$author['src'] ?? null" :fallback="$author['fallback'] ?? null" :alt="$author['name']" />
<div class="flex flex-col">
<span class="text-sm font-semibold text-foreground">{{ $author['name'] }}</span>
@if (! empty($author['role']))
<span class="text-xs text-muted-foreground">{{ __($author['role']) }}</span>
@endif
</div>
</div>
@endforeach
</div>
@endif
</div>
</header>
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