Skip to content
Brok UI

Loading…

No results

Portfolio

Open source

Creative-work showcases — a filterable grid of project cards with gradient media and a hover-revealed view action, plus divided-row and card-grid case-study layouts.

Preview

resources/views/blocks/portfolio-masonry.blade.php Blade
@props([
    'eyebrow'    => 'Selected work',
    'heading'    => 'Built end to end',
    'subheading' => 'A cross-section of recent projects — branding, product, and web — each shaped from first sketch to final delivery.',
    'projects'   => null,
])

@php
    $projects ??= [
        ['title' => 'Meridian brand system', 'category' => 'Branding', 'href' => '#', 'aspect' => 'aspect-[3/4]', 'gradient' => 'from-primary/30 via-muted to-secondary/20'],
        ['title' => 'Volta marketing site', 'category' => 'Web', 'href' => '#', 'aspect' => 'aspect-square', 'gradient' => 'from-secondary/30 via-muted to-accent/20'],
        ['title' => 'Lattice mobile app', 'category' => 'Product', 'href' => '#', 'aspect' => 'aspect-[4/3]', 'gradient' => 'from-accent/25 via-muted to-primary/15'],
        ['title' => 'Forma packaging', 'category' => 'Branding', 'href' => '#', 'aspect' => 'aspect-[3/4]', 'gradient' => 'from-muted via-secondary/30 to-accent/20'],
        ['title' => 'Beacon dashboard', 'category' => 'Product', 'href' => '#', 'aspect' => 'aspect-[4/3]', 'gradient' => 'from-primary/20 via-muted to-secondary/25'],
        ['title' => 'Prism design system', 'category' => 'Product', 'href' => '#', 'aspect' => 'aspect-square', 'gradient' => 'from-secondary/20 via-primary/10 to-muted'],
        ['title' => 'Atlas editorial', 'category' => 'Web', 'href' => '#', 'aspect' => 'aspect-[3/4]', 'gradient' => 'from-accent/20 via-muted to-primary/20'],
        ['title' => 'Kinetic title sequence', 'category' => 'Motion', 'href' => '#', 'aspect' => 'aspect-[4/3]', 'gradient' => 'from-muted via-accent/25 to-secondary/20'],
    ];
@endphp

<x-ui.section space="xl" {{ $attributes }}>
    <x-ui.container gutter="sm">
        <x-ui.section-heading align="center" overline-style="badge" :overline="$eyebrow" :title="$heading" :subtitle="$subheading" />

        <div class="mt-12 columns-1 gap-4 sm:columns-2 lg:columns-3 [&>*]:mb-4 [&>*]:break-inside-avoid" role="list" aria-label="{{ __('Portfolio projects') }}">
            @foreach ($projects as $project)
                <figure class="group relative overflow-hidden rounded-lg border border-border bg-card shadow-sm" role="listitem">
                    <div class="w-full bg-gradient-to-br {{ $project['aspect'] }} {{ $project['gradient'] }}" aria-hidden="true"></div>
                    <figcaption class="absolute inset-0 flex flex-col items-start justify-end gap-2 bg-gradient-to-t from-background/90 via-background/50 to-transparent p-4 opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">
                        <x-ui.badge variant="secondary" size="sm">{{ __($project['category']) }}</x-ui.badge>
                        <span class="text-sm font-semibold leading-snug text-foreground">{{ __($project['title']) }}</span>
                        <a href="{{ $project['href'] ?? '#' }}" class="absolute inset-0 rounded-lg outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" aria-label="{{ __('View project') }}: {{ __($project['title']) }}"></a>
                    </figcaption>
                </figure>
            @endforeach
        </div>
    </x-ui.container>
</x-ui.section>

Installation

terminal
php artisan ui:add blocks/portfolio-masonry

Installs these dependencies automatically:

Registry contract

Install confidence

php artisan ui:add blocks/portfolio-masonry 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/portfolio-masonry.blade.php

Registry dependencies

badge container section section-heading

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.

portfolio-masonry.md
# Brok UI block: Portfolio Masonry (`portfolio-masonry`)

A portfolio section as a CSS-columns masonry wall of varied-height project tiles with hover captions.

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/portfolio-masonry
```

## Render it

```blade
<x-blocks.portfolio-masonry />
```

## Props

- `eyebrow` (string, default `Selected work`) — Small label shown above the heading.
- `heading` (string, default `Built end to end`) — Section headline.
- `subheading` (string, default `A cross-section of recent projects — branding, product, and web — each shaped from first sketch to final delivery.`) — Supporting copy under the heading.
- `projects` (mixed|null, default `null`) — Array of masonry tiles ({title, category, href, aspect, gradient}); null falls back to sample projects.

## Use when

- Displaying projects as a dense CSS-columns masonry wall of varied-height, varied-aspect tiles.
- Revealing each tile's category and title as a caption overlay on hover or focus instead of static labels.

## Avoid when

- Needing category filter chips (portfolio-grid) or case-study rows with descriptions and result metrics (portfolio-case-studies-rows).

## Rules

- Render the installed block with `<x-blocks.portfolio-masonry />` 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/portfolio-masonry
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/portfolio-masonry.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

  • Displaying projects as a dense CSS-columns masonry wall of varied-height, varied-aspect tiles.
  • Revealing each tile's category and title as a caption overlay on hover or focus instead of static labels.

Avoid when

  • Needing category filter chips (portfolio-grid) or case-study rows with descriptions and result metrics (portfolio-case-studies-rows).

Anti-patterns

  • Do not replace semantic props with conflicting utility classes.
  • Do not remove labels, focus styles, or state attributes.
Anatomy
section heading masonry columns project tile hover caption with category and title

Usage

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

resources/views/welcome.blade.php Blade
<x-blocks.portfolio-masonry />

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/portfolio-masonry.blade.php Blade
@props([
    'eyebrow'    => 'Selected work',
    'heading'    => 'Built end to end',
    'subheading' => 'A cross-section of recent projects — branding, product, and web — each shaped from first sketch to final delivery.',
    'projects'   => null,
])

@php
    $projects ??= [
        ['title' => 'Meridian brand system', 'category' => 'Branding', 'href' => '#', 'aspect' => 'aspect-[3/4]', 'gradient' => 'from-primary/30 via-muted to-secondary/20'],
        ['title' => 'Volta marketing site', 'category' => 'Web', 'href' => '#', 'aspect' => 'aspect-square', 'gradient' => 'from-secondary/30 via-muted to-accent/20'],
        ['title' => 'Lattice mobile app', 'category' => 'Product', 'href' => '#', 'aspect' => 'aspect-[4/3]', 'gradient' => 'from-accent/25 via-muted to-primary/15'],
        ['title' => 'Forma packaging', 'category' => 'Branding', 'href' => '#', 'aspect' => 'aspect-[3/4]', 'gradient' => 'from-muted via-secondary/30 to-accent/20'],
        ['title' => 'Beacon dashboard', 'category' => 'Product', 'href' => '#', 'aspect' => 'aspect-[4/3]', 'gradient' => 'from-primary/20 via-muted to-secondary/25'],
        ['title' => 'Prism design system', 'category' => 'Product', 'href' => '#', 'aspect' => 'aspect-square', 'gradient' => 'from-secondary/20 via-primary/10 to-muted'],
        ['title' => 'Atlas editorial', 'category' => 'Web', 'href' => '#', 'aspect' => 'aspect-[3/4]', 'gradient' => 'from-accent/20 via-muted to-primary/20'],
        ['title' => 'Kinetic title sequence', 'category' => 'Motion', 'href' => '#', 'aspect' => 'aspect-[4/3]', 'gradient' => 'from-muted via-accent/25 to-secondary/20'],
    ];
@endphp

<x-ui.section space="xl" {{ $attributes }}>
    <x-ui.container gutter="sm">
        <x-ui.section-heading align="center" overline-style="badge" :overline="$eyebrow" :title="$heading" :subtitle="$subheading" />

        <div class="mt-12 columns-1 gap-4 sm:columns-2 lg:columns-3 [&>*]:mb-4 [&>*]:break-inside-avoid" role="list" aria-label="{{ __('Portfolio projects') }}">
            @foreach ($projects as $project)
                <figure class="group relative overflow-hidden rounded-lg border border-border bg-card shadow-sm" role="listitem">
                    <div class="w-full bg-gradient-to-br {{ $project['aspect'] }} {{ $project['gradient'] }}" aria-hidden="true"></div>
                    <figcaption class="absolute inset-0 flex flex-col items-start justify-end gap-2 bg-gradient-to-t from-background/90 via-background/50 to-transparent p-4 opacity-0 transition-opacity duration-300 group-hover:opacity-100 group-focus-within:opacity-100 motion-reduce:transition-none">
                        <x-ui.badge variant="secondary" size="sm">{{ __($project['category']) }}</x-ui.badge>
                        <span class="text-sm font-semibold leading-snug text-foreground">{{ __($project['title']) }}</span>
                        <a href="{{ $project['href'] ?? '#' }}" class="absolute inset-0 rounded-lg outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2" aria-label="{{ __('View project') }}: {{ __($project['title']) }}"></a>
                    </figcaption>
                </figure>
            @endforeach
        </div>
    </x-ui.container>
</x-ui.section>

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