Skip to content
Brok UI

Loading…

No results

Auth

Open source

Authentication screens — sign in / sign up with split brand panels, testimonial sidebars and patterned backdrops, plus two-factor, password-recovery and email-verification cards.

Preview

6 of 12

resources/views/blocks/auth-pattern.blade.php Blade
@props([
    'brand' => 'Acme Inc',
    'heading' => 'Create your account',
    'subheading' => 'Start your free trial. No credit card required.',
    'action' => '#',
    'loginHref' => '#',
    'termsHref' => '#',
    'privacyHref' => '#',
])

<x-ui.section space="md" class="relative isolate grid min-h-screen place-items-center overflow-hidden px-4" {{ $attributes }}>
    <x-ui.dot-pattern :gap="22" :radius="1" fade class="opacity-60" />

    <x-ui.card class="relative w-full max-w-sm shadow-lg">
        <x-ui.card.header class="items-center text-center">
            <span class="mb-2 inline-flex size-12 items-center justify-center rounded-md border border-border bg-primary text-primary-foreground" aria-hidden="true">
                <svg class="size-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                    <path d="M12 2 2 7l10 5 10-5-10-5Z" />
                    <path d="m2 17 10 5 10-5" />
                    <path d="m2 12 10 5 10-5" />
                </svg>
            </span>
            <x-ui.card.title class="text-2xl">{{ __($heading) }}</x-ui.card.title>
            <x-ui.card.description>{{ __($subheading) }}</x-ui.card.description>
        </x-ui.card.header>

        <x-ui.card.content class="space-y-6">
            <div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
                <x-ui.social-button provider="google" type="button" block :label="__('Google')" />
                <x-ui.social-button provider="github" type="button" block :label="__('GitHub')" />
            </div>

            <div class="flex items-center gap-4">
                <x-ui.separator class="flex-1" />
                <span class="text-xs uppercase tracking-wide text-muted-foreground">{{ __('or') }}</span>
                <x-ui.separator class="flex-1" />
            </div>

            <form method="POST" action="{{ $action }}" class="space-y-4">
                @csrf

                <x-ui.field>
                    <x-ui.label for="auth-pattern-name" required>{{ __('Full name') }}</x-ui.label>
                    <x-ui.input id="auth-pattern-name" type="text" name="name" autocomplete="name" required placeholder="{{ __('Jane Doe') }}" />
                </x-ui.field>

                <x-ui.field>
                    <x-ui.label for="auth-pattern-email" required>{{ __('Email address') }}</x-ui.label>
                    <x-ui.input id="auth-pattern-email" type="email" name="email" autocomplete="email" required placeholder="{{ __('you@example.com') }}" />
                </x-ui.field>

                <x-ui.field>
                    <x-ui.label for="auth-pattern-password" required>{{ __('Password') }}</x-ui.label>
                    <x-ui.input id="auth-pattern-password" type="password" name="password" autocomplete="new-password" required />
                </x-ui.field>

                <x-ui.button type="submit" class="w-full">{{ __('Create account') }}</x-ui.button>
            </form>

            <p class="text-center text-xs text-muted-foreground">
                {{ __('By continuing you agree to our') }}
                <a href="{{ $termsHref }}" class="font-medium text-foreground hover:underline">{{ __('Terms') }}</a>
                {{ __('and') }}
                <a href="{{ $privacyHref }}" class="font-medium text-foreground hover:underline">{{ __('Privacy Policy') }}</a>.
            </p>
        </x-ui.card.content>

        <x-ui.card.footer class="justify-center">
            <p class="text-sm text-muted-foreground">
                {{ __('Already have an account?') }}
                <a href="{{ $loginHref }}" class="font-medium text-link hover:underline">{{ __('Sign in') }}</a>
            </p>
        </x-ui.card.footer>
    </x-ui.card>
</x-ui.section>

Installation

terminal
php artisan ui:add blocks/auth-pattern

Registry contract

Install confidence

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

Registry dependencies

button card dot-pattern field input label section separator social-button

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.

auth-pattern.md
# Brok UI block: Auth Pattern (`auth-pattern`)

Centered single-card sign-up over a full-bleed dot-pattern backdrop with social buttons, a separator, and an email/password form.

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/auth-pattern
```

## Render it

```blade
<x-blocks.auth-pattern />
```

## Props

- `brand` (string, default `Acme Inc`)
- `heading` (string, default `Create your account`)
- `subheading` (string, default `Start your free trial. No credit card required.`)
- `action` (string, default `#`)
- `login-href` (string, default `#`)
- `terms-href` (string, default `#`)
- `privacy-href` (string, default `#`)

## Use when

- Registering a new user on a single centred card set over a full-bleed dot-pattern backdrop for visual texture.
- Pairing social sign-in buttons and a separator with a conventional email/password form.

## Avoid when

- Use auth-sign-up for a plain-background registration card without a decorative backdrop.

## Rules

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

  • Registering a new user on a single centred card set over a full-bleed dot-pattern backdrop for visual texture.
  • Pairing social sign-in buttons and a separator with a conventional email/password form.

Avoid when

  • Use auth-sign-up for a plain-background registration card without a decorative backdrop.

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.auth-pattern />

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/auth-pattern.blade.php Blade
@props([
    'brand' => 'Acme Inc',
    'heading' => 'Create your account',
    'subheading' => 'Start your free trial. No credit card required.',
    'action' => '#',
    'loginHref' => '#',
    'termsHref' => '#',
    'privacyHref' => '#',
])

<x-ui.section space="md" class="relative isolate grid min-h-screen place-items-center overflow-hidden px-4" {{ $attributes }}>
    <x-ui.dot-pattern :gap="22" :radius="1" fade class="opacity-60" />

    <x-ui.card class="relative w-full max-w-sm shadow-lg">
        <x-ui.card.header class="items-center text-center">
            <span class="mb-2 inline-flex size-12 items-center justify-center rounded-md border border-border bg-primary text-primary-foreground" aria-hidden="true">
                <svg class="size-6" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                    <path d="M12 2 2 7l10 5 10-5-10-5Z" />
                    <path d="m2 17 10 5 10-5" />
                    <path d="m2 12 10 5 10-5" />
                </svg>
            </span>
            <x-ui.card.title class="text-2xl">{{ __($heading) }}</x-ui.card.title>
            <x-ui.card.description>{{ __($subheading) }}</x-ui.card.description>
        </x-ui.card.header>

        <x-ui.card.content class="space-y-6">
            <div class="grid grid-cols-1 gap-4 sm:grid-cols-2">
                <x-ui.social-button provider="google" type="button" block :label="__('Google')" />
                <x-ui.social-button provider="github" type="button" block :label="__('GitHub')" />
            </div>

            <div class="flex items-center gap-4">
                <x-ui.separator class="flex-1" />
                <span class="text-xs uppercase tracking-wide text-muted-foreground">{{ __('or') }}</span>
                <x-ui.separator class="flex-1" />
            </div>

            <form method="POST" action="{{ $action }}" class="space-y-4">
                @csrf

                <x-ui.field>
                    <x-ui.label for="auth-pattern-name" required>{{ __('Full name') }}</x-ui.label>
                    <x-ui.input id="auth-pattern-name" type="text" name="name" autocomplete="name" required placeholder="{{ __('Jane Doe') }}" />
                </x-ui.field>

                <x-ui.field>
                    <x-ui.label for="auth-pattern-email" required>{{ __('Email address') }}</x-ui.label>
                    <x-ui.input id="auth-pattern-email" type="email" name="email" autocomplete="email" required placeholder="{{ __('you@example.com') }}" />
                </x-ui.field>

                <x-ui.field>
                    <x-ui.label for="auth-pattern-password" required>{{ __('Password') }}</x-ui.label>
                    <x-ui.input id="auth-pattern-password" type="password" name="password" autocomplete="new-password" required />
                </x-ui.field>

                <x-ui.button type="submit" class="w-full">{{ __('Create account') }}</x-ui.button>
            </form>

            <p class="text-center text-xs text-muted-foreground">
                {{ __('By continuing you agree to our') }}
                <a href="{{ $termsHref }}" class="font-medium text-foreground hover:underline">{{ __('Terms') }}</a>
                {{ __('and') }}
                <a href="{{ $privacyHref }}" class="font-medium text-foreground hover:underline">{{ __('Privacy Policy') }}</a>.
            </p>
        </x-ui.card.content>

        <x-ui.card.footer class="justify-center">
            <p class="text-sm text-muted-foreground">
                {{ __('Already have an account?') }}
                <a href="{{ $loginHref }}" class="font-medium text-link hover:underline">{{ __('Sign in') }}</a>
            </p>
        </x-ui.card.footer>
    </x-ui.card>
</x-ui.section>

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