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

3 of 12

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

<x-ui.section space="md" class="flex min-h-svh items-center justify-center px-4" {{ $attributes }}>
    <x-ui.card class="w-full max-w-sm">
        <x-ui.card.header class="text-center">
            <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>
            <form method="POST" action="{{ $action }}" class="space-y-4">
                @csrf

                <div class="grid gap-4 sm:grid-cols-2">
                    <x-ui.field>
                        <x-ui.label for="register-first" required>{{ __('First name') }}</x-ui.label>
                        <x-ui.input id="register-first" name="first_name" autocomplete="given-name" required />
                    </x-ui.field>

                    <x-ui.field>
                        <x-ui.label for="register-last" required>{{ __('Last name') }}</x-ui.label>
                        <x-ui.input id="register-last" name="last_name" autocomplete="family-name" required />
                    </x-ui.field>
                </div>

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

                <x-ui.field>
                    <x-ui.label for="register-password" required>{{ __('Password') }}</x-ui.label>
                    <x-ui.input id="register-password" type="password" name="password" autocomplete="new-password" required />
                    <x-ui.field.description>{{ __('Must be at least 8 characters.') }}</x-ui.field.description>
                </x-ui.field>

                <label class="flex items-start gap-2 text-sm text-muted-foreground">
                    <x-ui.checkbox name="terms" required class="mt-0.5" />
                    <span>{{ __('I agree to the') }} <a href="{{ $termsHref }}" class="font-medium text-link hover:underline">{{ __('Terms of Service') }}</a></span>
                </label>

                <x-ui.button type="submit" class="w-full">{{ __('Create account') }}</x-ui.button>
            </form>
        </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-sign-up

Installs these dependencies automatically:

Registry contract

Install confidence

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

Registry dependencies

button card checkbox field input label section

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-sign-up.md
# Brok UI block: Register (`auth-sign-up`)

A centered registration card with name, email, password fields, terms consent, and sign-in link.

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-sign-up
```

## Render it

```blade
<x-blocks.auth-sign-up />
```

## Props

- `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 `#`)

## Use when

- Registering a new user with a centred name/email/password card and an explicit terms-of-service consent line.
- Linking back to sign-in for a visitor who already has an account.

## Avoid when

- Use auth-sign-in for the matching login form, or auth-testimonial for a sign-up card paired with a testimonial sidebar.

## Rules

- Render the installed block with `<x-blocks.auth-sign-up />` 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-sign-up
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/auth-sign-up.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 with a centred name/email/password card and an explicit terms-of-service consent line.
  • Linking back to sign-in for a visitor who already has an account.

Avoid when

  • Use auth-sign-in for the matching login form, or auth-testimonial for a sign-up card paired with a testimonial sidebar.

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-sign-up />

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

<x-ui.section space="md" class="flex min-h-svh items-center justify-center px-4" {{ $attributes }}>
    <x-ui.card class="w-full max-w-sm">
        <x-ui.card.header class="text-center">
            <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>
            <form method="POST" action="{{ $action }}" class="space-y-4">
                @csrf

                <div class="grid gap-4 sm:grid-cols-2">
                    <x-ui.field>
                        <x-ui.label for="register-first" required>{{ __('First name') }}</x-ui.label>
                        <x-ui.input id="register-first" name="first_name" autocomplete="given-name" required />
                    </x-ui.field>

                    <x-ui.field>
                        <x-ui.label for="register-last" required>{{ __('Last name') }}</x-ui.label>
                        <x-ui.input id="register-last" name="last_name" autocomplete="family-name" required />
                    </x-ui.field>
                </div>

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

                <x-ui.field>
                    <x-ui.label for="register-password" required>{{ __('Password') }}</x-ui.label>
                    <x-ui.input id="register-password" type="password" name="password" autocomplete="new-password" required />
                    <x-ui.field.description>{{ __('Must be at least 8 characters.') }}</x-ui.field.description>
                </x-ui.field>

                <label class="flex items-start gap-2 text-sm text-muted-foreground">
                    <x-ui.checkbox name="terms" required class="mt-0.5" />
                    <span>{{ __('I agree to the') }} <a href="{{ $termsHref }}" class="font-medium text-link hover:underline">{{ __('Terms of Service') }}</a></span>
                </label>

                <x-ui.button type="submit" class="w-full">{{ __('Create account') }}</x-ui.button>
            </form>
        </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.0.5
Status
Stable
License
open
Deprecation
Not deprecated
Contract
v1
Foundation
≥ 1.0.0