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

2 of 12

resources/views/blocks/auth-passwordless.blade.php Blade
@props([
    'signupHref' => '#',
])

{{--
    Auth Passwordless 01 — Magic-link sign-in.
    No password field; the user enters their email and receives a magic link.
    A divider separates the email flow from optional OAuth providers (Google, GitHub).
    Composes <x-ui.card>, <x-ui.input>, <x-ui.button> and <x-ui.social-button> primitives.
--}}
<x-ui.section
    data-slot="block-auth-passwordless"
    aria-labelledby="auth-passwordless-heading"
    space="md" class="flex min-h-[36rem] items-center justify-center px-4" {{ $attributes }}
>
    <x-ui.card class="w-full max-w-md">
        <x-ui.card.header class="items-center text-center">
            {{-- Brand mark --}}
            <div class="mb-4 grid size-10 shrink-0 place-items-center rounded-md bg-primary text-primary-foreground" aria-hidden="true">
                <svg class="size-5" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
                    <path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" />
                </svg>
            </div>
            <x-ui.card.title id="auth-passwordless-heading" class="text-xl">
                {{ __('Sign in') }}
            </x-ui.card.title>
            <x-ui.card.description>
                {{ __('Enter your email and we\'ll send you a magic link — no password required.') }}
            </x-ui.card.description>
        </x-ui.card.header>

        <x-ui.card.content class="space-y-6">
            {{-- Magic-link form --}}
            <form method="POST" action="#" class="space-y-4">
                @csrf
                <div class="space-y-2">
                    <label for="auth-passwordless-email" class="block text-sm font-medium text-foreground">
                        {{ __('Email address') }}
                    </label>
                    <x-ui.input
                        id="auth-passwordless-email"
                        type="email"
                        name="email"
                        placeholder="{{ __('you@example.com') }}"
                        autocomplete="email"
                        required
                        class="w-full"
                    />
                </div>
                <x-ui.button type="submit" class="w-full">
                    {{ __('Send magic link') }}
                </x-ui.button>
            </form>

            {{-- Divider --}}
            <div class="relative flex items-center gap-4">
                <span class="h-px flex-1 bg-border" aria-hidden="true"></span>
                <span class="text-xs text-muted-foreground">{{ __('or continue with') }}</span>
                <span class="h-px flex-1 bg-border" aria-hidden="true"></span>
            </div>

            {{-- OAuth buttons --}}
            <div class="grid grid-cols-2 gap-4">
                <x-ui.social-button provider="google" href="#" block :label="__('Google')" />
                <x-ui.social-button provider="github" href="#" block :label="__('GitHub')" />
            </div>
        </x-ui.card.content>

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

Installation

terminal
php artisan ui:add blocks/auth-passwordless

Installs these dependencies automatically:

Registry contract

Install confidence

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

Registry dependencies

button card input section 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-passwordless.md
# Brok UI block: Auth Passwordless (`auth-passwordless`)

Magic-link sign-in form — email field with no password, plus Google and GitHub OAuth fallbacks.

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

## Render it

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

## Props

- `signup-href` (string, default `#`)

## Use when

- Offering email-only, password-free sign-in via a magic link, with Google and GitHub OAuth as fallbacks.
- Skipping a password field entirely for products that only need to verify an email address.

## Avoid when

- Use auth-sign-in for a conventional email/password login form instead of a passwordless flow.

## Rules

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

  • Offering email-only, password-free sign-in via a magic link, with Google and GitHub OAuth as fallbacks.
  • Skipping a password field entirely for products that only need to verify an email address.

Avoid when

  • Use auth-sign-in for a conventional email/password login form instead of a passwordless flow.

Anti-patterns

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

Usage

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

resources/views/welcome.blade.php Blade
<x-blocks.auth-passwordless />

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-passwordless.blade.php Blade
@props([
    'signupHref' => '#',
])

{{--
    Auth Passwordless 01 — Magic-link sign-in.
    No password field; the user enters their email and receives a magic link.
    A divider separates the email flow from optional OAuth providers (Google, GitHub).
    Composes <x-ui.card>, <x-ui.input>, <x-ui.button> and <x-ui.social-button> primitives.
--}}
<x-ui.section
    data-slot="block-auth-passwordless"
    aria-labelledby="auth-passwordless-heading"
    space="md" class="flex min-h-[36rem] items-center justify-center px-4" {{ $attributes }}
>
    <x-ui.card class="w-full max-w-md">
        <x-ui.card.header class="items-center text-center">
            {{-- Brand mark --}}
            <div class="mb-4 grid size-10 shrink-0 place-items-center rounded-md bg-primary text-primary-foreground" aria-hidden="true">
                <svg class="size-5" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
                    <path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" />
                </svg>
            </div>
            <x-ui.card.title id="auth-passwordless-heading" class="text-xl">
                {{ __('Sign in') }}
            </x-ui.card.title>
            <x-ui.card.description>
                {{ __('Enter your email and we\'ll send you a magic link — no password required.') }}
            </x-ui.card.description>
        </x-ui.card.header>

        <x-ui.card.content class="space-y-6">
            {{-- Magic-link form --}}
            <form method="POST" action="#" class="space-y-4">
                @csrf
                <div class="space-y-2">
                    <label for="auth-passwordless-email" class="block text-sm font-medium text-foreground">
                        {{ __('Email address') }}
                    </label>
                    <x-ui.input
                        id="auth-passwordless-email"
                        type="email"
                        name="email"
                        placeholder="{{ __('you@example.com') }}"
                        autocomplete="email"
                        required
                        class="w-full"
                    />
                </div>
                <x-ui.button type="submit" class="w-full">
                    {{ __('Send magic link') }}
                </x-ui.button>
            </form>

            {{-- Divider --}}
            <div class="relative flex items-center gap-4">
                <span class="h-px flex-1 bg-border" aria-hidden="true"></span>
                <span class="text-xs text-muted-foreground">{{ __('or continue with') }}</span>
                <span class="h-px flex-1 bg-border" aria-hidden="true"></span>
            </div>

            {{-- OAuth buttons --}}
            <div class="grid grid-cols-2 gap-4">
                <x-ui.social-button provider="google" href="#" block :label="__('Google')" />
                <x-ui.social-button provider="github" href="#" block :label="__('GitHub')" />
            </div>
        </x-ui.card.content>

        <x-ui.card.footer class="justify-center">
            <p class="text-center text-sm text-muted-foreground">
                {{ __("Don't have an account?") }}
                <a href="{{ $signupHref }}" class="ms-2 font-medium text-link hover:underline">{{ __('Sign up') }}</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.2
Status
Stable
License
open
Deprecation
Not deprecated
Contract
v1
Foundation
≥ 1.0.0