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

7 of 8

resources/views/blocks/footer-app.blade.php Blade
@props([
    'brand'         => 'Acme',
    'tagline'       => 'Build faster. Ship everywhere.',
    'appStoreHref'  => '#',
    'playStoreHref' => '#',
    'columns'       => null,
    'socials'       => null,
    'copyright'     => null,
])

@php
    $columns ??= [
        ['heading' => 'Product', 'links' => [['label' => 'Features', 'href' => '#'], ['label' => 'Pricing', 'href' => '#'], ['label' => 'Changelog', 'href' => '#'], ['label' => 'Roadmap', 'href' => '#']]],
        ['heading' => 'Company', 'links' => [['label' => 'About', 'href' => '#'], ['label' => 'Blog', 'href' => '#'], ['label' => 'Careers', 'href' => '#'], ['label' => 'Press', 'href' => '#']]],
        ['heading' => 'Support', 'links' => [['label' => 'Help Centre', 'href' => '#'], ['label' => 'Documentation', 'href' => '#'], ['label' => 'Status', 'href' => '#'], ['label' => 'Contact', 'href' => '#']]],
    ];

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

    // 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);

    $copyright ??= '© '.date('Y').' '.$brand.'. '.__('All rights reserved.');
@endphp

<footer data-slot="footer" {{ $attributes->merge(['class' => 'border-t border-border bg-background text-foreground']) }}>
    <div class="mx-auto max-w-7xl px-4 py-12 sm:py-16">
        <div class="grid gap-12 lg:grid-cols-[auto_1fr] lg:gap-16">
            <div class="flex flex-col gap-6 lg:max-w-xs">
                <x-ui.brand href="#" :label="$brand" class="self-start" />
                <p class="text-sm leading-relaxed text-muted-foreground">{{ __($tagline) }}</p>

                <div class="flex flex-col gap-4 sm:flex-row lg:flex-col xl:flex-row" data-slot="app-badges">
                    <x-ui.button variant="outline" :href="$appStoreHref" class="inline-flex h-auto items-center gap-4 rounded-md px-4 py-2 text-start" aria-label="{{ __('Download on the App Store') }}">
                        <svg class="size-6 shrink-0" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
                            <path d="M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.8-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z" />
                        </svg>
                        <span class="flex flex-col leading-tight">
                            <span class="text-2xs font-normal text-muted-foreground">{{ __('Download on the') }}</span>
                            <span class="text-sm font-semibold">{{ __('App Store') }}</span>
                        </span>
                    </x-ui.button>
                    <x-ui.button variant="outline" :href="$playStoreHref" class="inline-flex h-auto items-center gap-4 rounded-md px-4 py-2 text-start" aria-label="{{ __('Get it on Google Play') }}">
                        <svg class="size-6 shrink-0" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
                            <path d="M3.18 23.76c.3.17.65.19.98.07l.1-.07 10.38-10.38-2.29-2.29L3.18 20.25a.98.98 0 0 0-.18.55v2.41c0 .2.07.4.18.55zm17.02-11.39L17.6 10.9l-2.52 2.52 2.52 2.52 2.6-1.47c.74-.42.74-1.48 0-1.9zm-15.86-9.2a.98.98 0 0 0-.16.54v19.57c0 .2.06.39.16.54l.07.07 10.96-10.96v-.26L4.41 3.1l-.07.07zM12.25 13.4 3.18 4.33l-.09-.07c.09-.13.2-.24.34-.3l.14-.05.09.01 11.88 6.72-3.29 2.76z" />
                        </svg>
                        <span class="flex flex-col leading-tight">
                            <span class="text-2xs font-normal text-muted-foreground">{{ __('Get it on') }}</span>
                            <span class="text-sm font-semibold">{{ __('Google Play') }}</span>
                        </span>
                    </x-ui.button>
                </div>
            </div>

            <div class="grid grid-cols-2 gap-8 sm:grid-cols-3">
                @foreach ($columns as $column)
                    <div>
                        <h2 class="text-sm font-semibold">{{ __($column['heading']) }}</h2>
                        <ul role="list" class="mt-4 space-y-4 text-sm">
                            @foreach ($column['links'] 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>
                    </div>
                @endforeach
            </div>
        </div>

        <div class="mt-12 flex flex-col gap-4 border-t border-border pt-8 sm:flex-row sm:items-center sm:justify-between">
            <p class="text-sm text-muted-foreground">{{ $copyright }}</p>
            <x-ui.social-links :links="$socialLinks" size="sm" />
        </div>
    </div>
</footer>

Installation

terminal
php artisan ui:add blocks/footer-app

Installs these dependencies automatically:

Registry contract

Install confidence

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

Registry dependencies

brand button 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-app.md
# Brok UI block: Footer App (`footer-app`)

A marketing footer featuring App Store and Google Play download badges beside link columns, with a social-icon row in the bottom bar.

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

## Render it

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

## Props

- `brand` (string, default `Acme`)
- `tagline` (string, default `Build faster. Ship everywhere.`)
- `app-store-href` (string, default `#`)
- `play-store-href` (string, default `#`)
- `columns` (mixed|null, default `null`)
- `socials` (mixed|null, default `null`)
- `copyright` (mixed|null, default `null`)

## Use when

- Closing a marketing site for a mobile app with App Store and Google Play download badges beside link columns.
- Placing a social-icon row in the bottom bar beneath the download badges.

## Avoid when

- Use footer-columns for a footer without app-store download badges.

## Rules

- Render the installed block with `<x-blocks.footer-app />` 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-app
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/footer-app.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 marketing site for a mobile app with App Store and Google Play download badges beside link columns.
  • Placing a social-icon row in the bottom bar beneath the download badges.

Avoid when

  • Use footer-columns for a footer without app-store download badges.

Anti-patterns

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

Usage

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

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

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-app.blade.php Blade
@props([
    'brand'         => 'Acme',
    'tagline'       => 'Build faster. Ship everywhere.',
    'appStoreHref'  => '#',
    'playStoreHref' => '#',
    'columns'       => null,
    'socials'       => null,
    'copyright'     => null,
])

@php
    $columns ??= [
        ['heading' => 'Product', 'links' => [['label' => 'Features', 'href' => '#'], ['label' => 'Pricing', 'href' => '#'], ['label' => 'Changelog', 'href' => '#'], ['label' => 'Roadmap', 'href' => '#']]],
        ['heading' => 'Company', 'links' => [['label' => 'About', 'href' => '#'], ['label' => 'Blog', 'href' => '#'], ['label' => 'Careers', 'href' => '#'], ['label' => 'Press', 'href' => '#']]],
        ['heading' => 'Support', 'links' => [['label' => 'Help Centre', 'href' => '#'], ['label' => 'Documentation', 'href' => '#'], ['label' => 'Status', 'href' => '#'], ['label' => 'Contact', 'href' => '#']]],
    ];

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

    // 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);

    $copyright ??= '© '.date('Y').' '.$brand.'. '.__('All rights reserved.');
@endphp

<footer data-slot="footer" {{ $attributes->merge(['class' => 'border-t border-border bg-background text-foreground']) }}>
    <div class="mx-auto max-w-7xl px-4 py-12 sm:py-16">
        <div class="grid gap-12 lg:grid-cols-[auto_1fr] lg:gap-16">
            <div class="flex flex-col gap-6 lg:max-w-xs">
                <x-ui.brand href="#" :label="$brand" class="self-start" />
                <p class="text-sm leading-relaxed text-muted-foreground">{{ __($tagline) }}</p>

                <div class="flex flex-col gap-4 sm:flex-row lg:flex-col xl:flex-row" data-slot="app-badges">
                    <x-ui.button variant="outline" :href="$appStoreHref" class="inline-flex h-auto items-center gap-4 rounded-md px-4 py-2 text-start" aria-label="{{ __('Download on the App Store') }}">
                        <svg class="size-6 shrink-0" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
                            <path d="M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.8-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M13 3.5c.73-.83 1.94-1.46 2.94-1.5.13 1.17-.34 2.35-1.04 3.19-.69.85-1.83 1.51-2.95 1.42-.15-1.15.41-2.35 1.05-3.11z" />
                        </svg>
                        <span class="flex flex-col leading-tight">
                            <span class="text-2xs font-normal text-muted-foreground">{{ __('Download on the') }}</span>
                            <span class="text-sm font-semibold">{{ __('App Store') }}</span>
                        </span>
                    </x-ui.button>
                    <x-ui.button variant="outline" :href="$playStoreHref" class="inline-flex h-auto items-center gap-4 rounded-md px-4 py-2 text-start" aria-label="{{ __('Get it on Google Play') }}">
                        <svg class="size-6 shrink-0" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
                            <path d="M3.18 23.76c.3.17.65.19.98.07l.1-.07 10.38-10.38-2.29-2.29L3.18 20.25a.98.98 0 0 0-.18.55v2.41c0 .2.07.4.18.55zm17.02-11.39L17.6 10.9l-2.52 2.52 2.52 2.52 2.6-1.47c.74-.42.74-1.48 0-1.9zm-15.86-9.2a.98.98 0 0 0-.16.54v19.57c0 .2.06.39.16.54l.07.07 10.96-10.96v-.26L4.41 3.1l-.07.07zM12.25 13.4 3.18 4.33l-.09-.07c.09-.13.2-.24.34-.3l.14-.05.09.01 11.88 6.72-3.29 2.76z" />
                        </svg>
                        <span class="flex flex-col leading-tight">
                            <span class="text-2xs font-normal text-muted-foreground">{{ __('Get it on') }}</span>
                            <span class="text-sm font-semibold">{{ __('Google Play') }}</span>
                        </span>
                    </x-ui.button>
                </div>
            </div>

            <div class="grid grid-cols-2 gap-8 sm:grid-cols-3">
                @foreach ($columns as $column)
                    <div>
                        <h2 class="text-sm font-semibold">{{ __($column['heading']) }}</h2>
                        <ul role="list" class="mt-4 space-y-4 text-sm">
                            @foreach ($column['links'] 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>
                    </div>
                @endforeach
            </div>
        </div>

        <div class="mt-12 flex flex-col gap-4 border-t border-border pt-8 sm:flex-row sm:items-center sm:justify-between">
            <p class="text-sm text-muted-foreground">{{ $copyright }}</p>
            <x-ui.social-links :links="$socialLinks" size="sm" />
        </div>
    </div>
</footer>

Ownership & lifecycle

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