Skip to content
Brok UI

Loading…

No results

Footer

Open source

Site footers — a columns layout, a newsletter lead, a centered minimal, a wide mega footer and a CTA-led footer.

Preview

8 of 8

resources/views/blocks/footer-social.blade.php Blade
@props([
    'brand'      => 'Acme',
    'brandGlyph' => 'A',
    'tagline'    => 'Beautiful software, thoughtfully crafted.',
    'navLinks'   => null,
    'socials'    => null,
    'copyrightOwner' => 'Acme Inc.',
])

@php
    $navLinks ??= [
        ['label' => 'About', 'href' => '#'],
        ['label' => 'Blog', 'href' => '#'],
        ['label' => 'Careers', 'href' => '#'],
        ['label' => 'Pricing', 'href' => '#'],
        ['label' => 'Contact', 'href' => '#'],
    ];

    $socials ??= [
        ['platform' => 'x', 'label' => 'X', 'href' => '#'],
        ['platform' => 'github', 'label' => 'GitHub', 'href' => '#'],
        ['platform' => 'linkedin', 'label' => 'LinkedIn', 'href' => '#'],
        ['platform' => 'youtube', 'label' => 'YouTube', 'href' => '#'],
        ['platform' => 'instagram', 'label' => 'Instagram', 'href' => '#'],
    ];

    // Map the block's `socials` contract onto social-links: `platform` (or the older
    // `icon` key / a label) picks the mark; a raw `path` becomes a custom `icon`.
    $socialLinks = array_map(fn (array $s) => [
        'platform' => $s['platform'] ?? (isset($s['icon']) && ! str_contains($s['icon'], '<') ? $s['icon'] : strtolower(str_replace('.', '', $s['label'] ?? 'x'))),
        'label' => $s['label'] ?? null,
        'href' => $s['href'] ?? '#',
        'icon' => isset($s['path']) ? '<path d="'.$s['path'].'"/>' : (isset($s['icon']) && str_contains($s['icon'], '<') ? $s['icon'] : null),
    ], $socials);

@endphp

<footer data-slot="footer" {{ $attributes->merge(['class' => 'border-t border-border bg-background text-foreground']) }}>
    <div class="mx-auto max-w-4xl px-4 py-12 text-center sm:py-16">
        <div class="mb-4 flex justify-center">
            <x-ui.brand :label="$brand" :glyph="$brandGlyph" size="lg" />
        </div>
        <p class="mb-8 text-sm text-muted-foreground">{{ __($tagline) }}</p>

        <nav aria-label="{{ __('Footer navigation') }}">
            <ul class="mb-10 flex flex-wrap justify-center gap-x-6 gap-y-2 text-sm">
                @foreach ($navLinks as $link)
                    <li><a href="{{ $link['href'] }}" class="rounded-sm text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">{{ __($link['label']) }}</a></li>
                @endforeach
            </ul>
        </nav>

        <x-ui.social-links :links="$socialLinks" variant="outline" size="sm" class="mb-10 justify-center" />

        <div class="border-t border-border pt-8">
            <p class="text-sm text-muted-foreground">&copy; {{ date('Y') }} {{ __($copyrightOwner) }}. {{ __('All rights reserved.') }}</p>
        </div>
    </div>
</footer>

Installation

terminal
php artisan ui:add blocks/footer-social

Installs these dependencies automatically:

Registry contract

Install confidence

php artisan ui:add blocks/footer-social 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.1.3
License
open
Stability
stable
Contract
v1
Foundation
≥ 1.0.0
Type Generated target
blade resources/views/blocks/footer-social.blade.php

Registry dependencies

brand social-links

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.

footer-social.md
# Brok UI block: Footer Social (`footer-social`)

A centered, social-forward minimal footer with a brand mark, a single nav row and a prominent row of outline social icon buttons.

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/footer-social
```

## Render it

```blade
<x-blocks.footer-social />
```

## Props

- `brand` (string, default `Acme`)
- `brand-glyph` (string, default `A`)
- `tagline` (string, default `Beautiful software, thoughtfully crafted.`)
- `nav-links` (mixed|null, default `null`)
- `socials` (mixed|null, default `null`)
- `copyright-owner` (string, default `Acme Inc.`)

## Use when

- Closing a site with a centred, social-forward minimal footer: a brand mark, a single nav row and a prominent social-icon row.
- Fitting a creator or community site where social links deserve more visual weight than legal links.

## Avoid when

- Use footer-centered for a centred footer led by a status line instead of a prominent social-icon row.

## Rules

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

  • Closing a site with a centred, social-forward minimal footer: a brand mark, a single nav row and a prominent social-icon row.
  • Fitting a creator or community site where social links deserve more visual weight than legal links.

Avoid when

  • Use footer-centered for a centred footer led by a status line instead of a prominent social-icon row.

Anti-patterns

  • Do not replace semantic props with conflicting utility classes.
  • Do not remove labels, focus styles, or state attributes.
Anatomy
root footer

Usage

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

resources/views/welcome.blade.php Blade
<x-blocks.footer-social />

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/footer-social.blade.php Blade
@props([
    'brand'      => 'Acme',
    'brandGlyph' => 'A',
    'tagline'    => 'Beautiful software, thoughtfully crafted.',
    'navLinks'   => null,
    'socials'    => null,
    'copyrightOwner' => 'Acme Inc.',
])

@php
    $navLinks ??= [
        ['label' => 'About', 'href' => '#'],
        ['label' => 'Blog', 'href' => '#'],
        ['label' => 'Careers', 'href' => '#'],
        ['label' => 'Pricing', 'href' => '#'],
        ['label' => 'Contact', 'href' => '#'],
    ];

    $socials ??= [
        ['platform' => 'x', 'label' => 'X', 'href' => '#'],
        ['platform' => 'github', 'label' => 'GitHub', 'href' => '#'],
        ['platform' => 'linkedin', 'label' => 'LinkedIn', 'href' => '#'],
        ['platform' => 'youtube', 'label' => 'YouTube', 'href' => '#'],
        ['platform' => 'instagram', 'label' => 'Instagram', 'href' => '#'],
    ];

    // Map the block's `socials` contract onto social-links: `platform` (or the older
    // `icon` key / a label) picks the mark; a raw `path` becomes a custom `icon`.
    $socialLinks = array_map(fn (array $s) => [
        'platform' => $s['platform'] ?? (isset($s['icon']) && ! str_contains($s['icon'], '<') ? $s['icon'] : strtolower(str_replace('.', '', $s['label'] ?? 'x'))),
        'label' => $s['label'] ?? null,
        'href' => $s['href'] ?? '#',
        'icon' => isset($s['path']) ? '<path d="'.$s['path'].'"/>' : (isset($s['icon']) && str_contains($s['icon'], '<') ? $s['icon'] : null),
    ], $socials);

@endphp

<footer data-slot="footer" {{ $attributes->merge(['class' => 'border-t border-border bg-background text-foreground']) }}>
    <div class="mx-auto max-w-4xl px-4 py-12 text-center sm:py-16">
        <div class="mb-4 flex justify-center">
            <x-ui.brand :label="$brand" :glyph="$brandGlyph" size="lg" />
        </div>
        <p class="mb-8 text-sm text-muted-foreground">{{ __($tagline) }}</p>

        <nav aria-label="{{ __('Footer navigation') }}">
            <ul class="mb-10 flex flex-wrap justify-center gap-x-6 gap-y-2 text-sm">
                @foreach ($navLinks as $link)
                    <li><a href="{{ $link['href'] }}" class="rounded-sm text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring">{{ __($link['label']) }}</a></li>
                @endforeach
            </ul>
        </nav>

        <x-ui.social-links :links="$socialLinks" variant="outline" size="sm" class="mb-10 justify-center" />

        <div class="border-t border-border pt-8">
            <p class="text-sm text-muted-foreground">&copy; {{ date('Y') }} {{ __($copyrightOwner) }}. {{ __('All rights reserved.') }}</p>
        </div>
    </div>
</footer>

Ownership & lifecycle

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