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

1 of 8

resources/views/blocks/footer-columns.blade.php Blade
@props([
    'brand' => 'Acme',
    'tagline' => 'The Laravel-native UI and blocks system.',
    'columns' => null,
    'newsletter' => true,
    'copyright' => null,
])

@php
    $columns ??= [
        ['heading' => 'Product', 'links' => [['label' => 'Components', 'href' => '#'], ['label' => 'Blocks', 'href' => '#'], ['label' => 'Pricing', 'href' => '#'], ['label' => 'Changelog', 'href' => '#']]],
        ['heading' => 'Resources', 'links' => [['label' => 'Documentation', 'href' => '#'], ['label' => 'Guides', 'href' => '#'], ['label' => 'Support', 'href' => '#']]],
        ['heading' => 'Company', 'links' => [['label' => 'About', 'href' => '#'], ['label' => 'Blog', 'href' => '#'], ['label' => 'Careers', 'href' => '#']]],
    ];

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

<footer {{ $attributes->merge(['class' => 'border-t border-border bg-background text-foreground']) }}>
    <div class="mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8">
        <div class="grid gap-10 lg:grid-cols-[2fr_3fr]">
            <div class="max-w-sm">
                <x-ui.brand href="#" :label="$brand" />
                <p class="mt-4 text-sm text-muted-foreground">{{ __($tagline) }}</p>

                @if ($newsletter)
                    <form class="mt-6 flex flex-col gap-2 sm:flex-row" aria-label="{{ __('Newsletter signup') }}">
                        <label for="footer-newsletter" class="sr-only">{{ __('Email address') }}</label>
                        <x-ui.input id="footer-newsletter" type="email" name="email" placeholder="{{ __('you@example.com') }}" class="sm:flex-1" />
                        <x-ui.button type="submit">{{ __('Subscribe') }}</x-ui.button>
                    </form>
                @endif
            </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 class="mt-4 space-y-4 text-sm">
                            @foreach ($column['links'] as $link)
                                <li>
                                    <a href="{{ $link['href'] }}" class="text-muted-foreground transition-colors hover:text-foreground">{{ __($link['label']) }}</a>
                                </li>
                            @endforeach
                        </ul>
                    </div>
                @endforeach
            </div>
        </div>

        <x-ui.separator class="my-8" />

        <p class="text-sm text-muted-foreground">{{ $copyright }}</p>
    </div>
</footer>

Installation

terminal
php artisan ui:add blocks/footer-columns

Installs these dependencies automatically:

Registry contract

Install confidence

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

Registry dependencies

brand button input separator

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

A multi-column site footer with brand, link columns, newsletter signup, and a copyright 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-columns
```

## Render it

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

## Props

- `brand` (string, default `Acme`)
- `tagline` (string, default `The Laravel-native UI and blocks system.`)
- `columns` (mixed|null, default `null`)
- `newsletter` (bool, default `true`)
- `copyright` (mixed|null, default `null`)

## Use when

- Closing a site with a multi-column footer: brand column, link groups, a newsletter signup and a copyright bar.
- Fitting a general-purpose marketing site that needs a standard, full-featured footer.

## Avoid when

- Use footer-minimal for a single-row minimal footer, or footer-centered for a centred minimal footer instead.

## Rules

- Render the installed block with `<x-blocks.footer-columns />` 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-columns
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/footer-columns.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 multi-column footer: brand column, link groups, a newsletter signup and a copyright bar.
  • Fitting a general-purpose marketing site that needs a standard, full-featured footer.

Avoid when

  • Use footer-minimal for a single-row minimal footer, or footer-centered for a centred minimal footer instead.

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:

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

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-columns.blade.php Blade
@props([
    'brand' => 'Acme',
    'tagline' => 'The Laravel-native UI and blocks system.',
    'columns' => null,
    'newsletter' => true,
    'copyright' => null,
])

@php
    $columns ??= [
        ['heading' => 'Product', 'links' => [['label' => 'Components', 'href' => '#'], ['label' => 'Blocks', 'href' => '#'], ['label' => 'Pricing', 'href' => '#'], ['label' => 'Changelog', 'href' => '#']]],
        ['heading' => 'Resources', 'links' => [['label' => 'Documentation', 'href' => '#'], ['label' => 'Guides', 'href' => '#'], ['label' => 'Support', 'href' => '#']]],
        ['heading' => 'Company', 'links' => [['label' => 'About', 'href' => '#'], ['label' => 'Blog', 'href' => '#'], ['label' => 'Careers', 'href' => '#']]],
    ];

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

<footer {{ $attributes->merge(['class' => 'border-t border-border bg-background text-foreground']) }}>
    <div class="mx-auto max-w-7xl px-4 py-12 sm:px-6 lg:px-8">
        <div class="grid gap-10 lg:grid-cols-[2fr_3fr]">
            <div class="max-w-sm">
                <x-ui.brand href="#" :label="$brand" />
                <p class="mt-4 text-sm text-muted-foreground">{{ __($tagline) }}</p>

                @if ($newsletter)
                    <form class="mt-6 flex flex-col gap-2 sm:flex-row" aria-label="{{ __('Newsletter signup') }}">
                        <label for="footer-newsletter" class="sr-only">{{ __('Email address') }}</label>
                        <x-ui.input id="footer-newsletter" type="email" name="email" placeholder="{{ __('you@example.com') }}" class="sm:flex-1" />
                        <x-ui.button type="submit">{{ __('Subscribe') }}</x-ui.button>
                    </form>
                @endif
            </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 class="mt-4 space-y-4 text-sm">
                            @foreach ($column['links'] as $link)
                                <li>
                                    <a href="{{ $link['href'] }}" class="text-muted-foreground transition-colors hover:text-foreground">{{ __($link['label']) }}</a>
                                </li>
                            @endforeach
                        </ul>
                    </div>
                @endforeach
            </div>
        </div>

        <x-ui.separator class="my-8" />

        <p class="text-sm text-muted-foreground">{{ $copyright }}</p>
    </div>
</footer>

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