Skip to content
Brok UI

Loading…

No results

Paywall

Open source

Conversion paywalls — inline plan upgrade, gated article content and a focused subscription card with billing toggle.

Preview

resources/views/blocks/paywall-upgrade.blade.php Blade
@props([
    'heading'     => 'Upgrade to Pro',
    'subheading'  => 'Unlock every feature and scale without limits.',
    'price'       => '$12',
    'period'      => '/mo',
    'socialProof' => 'Join 12,000+ teams on Pro',
    'benefits'    => [
        'Unlimited collaborators',
        'Advanced analytics',
        'Priority support',
        'Unlimited projects',
    ],
])

<x-ui.section space="xl" {{ $attributes }}>
    <x-ui.container size="sm" gutter="sm">
        <x-ui.card class="relative overflow-hidden shadow-lg ring-1 ring-border">

            {{-- Decorative top accent line --}}
            <div aria-hidden="true" class="absolute inset-x-0 top-0 h-1 bg-primary"></div>

            <x-ui.card.header class="pb-0 pt-8 text-center">

                {{-- Icon tile --}}
                <div class="mx-auto mb-6 flex size-14 items-center justify-center rounded-lg bg-primary/10">
                    <svg class="size-7 text-primary" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
                        <path d="M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74L12 2z"/>
                        <path d="M5 21l1.3-3.9L3 16l3.3-.9L7.5 12l1.2 3.1 3.3.9-2.3 1.1L10 21l-2.5-1.5L5 21z" opacity=".5"/>
                    </svg>
                </div>

                {{-- Plan chips --}}
                <div class="mb-4 flex items-center justify-center gap-2">
                    <span class="inline-flex items-center rounded-full border border-border bg-muted px-4 py-0.5 text-sm font-medium text-muted-foreground">
                        {{ __('Free') }}
                    </span>
                    <svg class="size-4 shrink-0 text-muted-foreground rtl:rotate-180" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
                        <path d="M5 12h14M13 6l6 6-6 6"/>
                    </svg>
                    <x-ui.badge variant="success">{{ __('Pro') }}</x-ui.badge>
                </div>

                {{-- Recommended badge --}}
                <div class="mb-4">
                    <x-ui.badge variant="success">{{ __('Recommended') }}</x-ui.badge>
                </div>

                <x-ui.card.title class="text-2xl font-bold tracking-tight sm:text-3xl">
                    {{ __($heading) }}
                </x-ui.card.title>

                <x-ui.card.description class="mt-2 text-sm text-muted-foreground">
                    {{ __($subheading) }}
                </x-ui.card.description>
            </x-ui.card.header>

            <x-ui.card.content class="pt-6">

                {{-- Benefits checklist --}}
                <x-ui.check-list class="mb-6" aria-label="{{ __('Plan benefits') }}">
                    @foreach ($benefits as $benefit)
                        <x-ui.check-list.item>{{ __($benefit) }}</x-ui.check-list.item>
                    @endforeach
                </x-ui.check-list>

                {{-- Price display --}}
                <div class="mb-6 text-center">
                    <span class="text-4xl font-bold tracking-tight text-foreground">{{ __($price) }}</span>
                    <span class="text-sm text-muted-foreground">{{ __($period) }}</span>
                </div>

            </x-ui.card.content>

            <x-ui.card.footer class="flex flex-col gap-4 pb-8">
                <x-ui.button class="w-full" size="lg">
                    {{ __('Upgrade now') }}
                </x-ui.button>

                <x-ui.button variant="ghost" class="w-full">
                    {{ __('Maybe later') }}
                </x-ui.button>

                {{-- Social proof --}}
                <p class="mt-2 text-center text-sm text-muted-foreground">
                    <svg class="me-2 inline-block size-4 align-middle text-muted-foreground" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
                        <path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"/>
                        <circle cx="9" cy="7" r="4"/>
                        <path d="M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75"/>
                    </svg>
                    {{ __($socialProof) }}
                </p>
            </x-ui.card.footer>

        </x-ui.card>
    </x-ui.container>
</x-ui.section>

Installation

terminal
php artisan ui:add blocks/paywall-upgrade

Installs these dependencies automatically:

Registry contract

Install confidence

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

Registry dependencies

badge button card check-list container 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.

paywall-upgrade.md
# Brok UI block: Paywall Upgrade (`paywall-upgrade`)

Centered plan-upgrade paywall card with icon tile, benefit checklist, plan chips, social proof, and primary/ghost CTA pair.

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/paywall-upgrade
```

## Render it

```blade
<x-blocks.paywall-upgrade />
```

## Props

- `heading` (string, default `Upgrade to Pro`) — Upgrade card headline.
- `subheading` (string, default `Unlock every feature and scale without limits.`) — Supporting copy under the heading.
- `price` (string, default `$12`) — Price amount shown in the price display.
- `period` (string, default `/mo`) — Billing period suffix shown after the price.
- `social-proof` (string, default `Join 12,000+ teams on Pro`) — Social-proof line shown under the CTAs.
- `benefits` (array, default `[…]`) — Array of benefit strings rendered in the checklist.

## Use when

- Prompting a free-plan user to upgrade with a standalone card showing a Free-to-Pro chip comparison, a benefit checklist and a price.
- Pairing a prominent upgrade CTA with a lower-emphasis dismiss action and a social-proof line.

## Avoid when

- Gating a specific piece of already-rendered content; use paywall-content for an inline blur/overlay gate or paywall-pricing for a plan card with a monthly/yearly billing toggle.

## Rules

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

  • Prompting a free-plan user to upgrade with a standalone card showing a Free-to-Pro chip comparison, a benefit checklist and a price.
  • Pairing a prominent upgrade CTA with a lower-emphasis dismiss action and a social-proof line.

Avoid when

  • Gating a specific piece of already-rendered content; use paywall-content for an inline blur/overlay gate or paywall-pricing for a plan card with a monthly/yearly billing toggle.

Anti-patterns

  • Do not replace semantic props with conflicting utility classes.
  • Do not remove labels, focus styles, or state attributes.
Anatomy
section icon tile plan comparison chips recommended badge heading/subheading benefit checklist price display upgrade/dismiss actions social proof line

Usage

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

resources/views/welcome.blade.php Blade
<x-blocks.paywall-upgrade />

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/paywall-upgrade.blade.php Blade
@props([
    'heading'     => 'Upgrade to Pro',
    'subheading'  => 'Unlock every feature and scale without limits.',
    'price'       => '$12',
    'period'      => '/mo',
    'socialProof' => 'Join 12,000+ teams on Pro',
    'benefits'    => [
        'Unlimited collaborators',
        'Advanced analytics',
        'Priority support',
        'Unlimited projects',
    ],
])

<x-ui.section space="xl" {{ $attributes }}>
    <x-ui.container size="sm" gutter="sm">
        <x-ui.card class="relative overflow-hidden shadow-lg ring-1 ring-border">

            {{-- Decorative top accent line --}}
            <div aria-hidden="true" class="absolute inset-x-0 top-0 h-1 bg-primary"></div>

            <x-ui.card.header class="pb-0 pt-8 text-center">

                {{-- Icon tile --}}
                <div class="mx-auto mb-6 flex size-14 items-center justify-center rounded-lg bg-primary/10">
                    <svg class="size-7 text-primary" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
                        <path d="M12 2l2.09 6.26L20 10l-5.91 1.74L12 18l-2.09-6.26L4 10l5.91-1.74L12 2z"/>
                        <path d="M5 21l1.3-3.9L3 16l3.3-.9L7.5 12l1.2 3.1 3.3.9-2.3 1.1L10 21l-2.5-1.5L5 21z" opacity=".5"/>
                    </svg>
                </div>

                {{-- Plan chips --}}
                <div class="mb-4 flex items-center justify-center gap-2">
                    <span class="inline-flex items-center rounded-full border border-border bg-muted px-4 py-0.5 text-sm font-medium text-muted-foreground">
                        {{ __('Free') }}
                    </span>
                    <svg class="size-4 shrink-0 text-muted-foreground rtl:rotate-180" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
                        <path d="M5 12h14M13 6l6 6-6 6"/>
                    </svg>
                    <x-ui.badge variant="success">{{ __('Pro') }}</x-ui.badge>
                </div>

                {{-- Recommended badge --}}
                <div class="mb-4">
                    <x-ui.badge variant="success">{{ __('Recommended') }}</x-ui.badge>
                </div>

                <x-ui.card.title class="text-2xl font-bold tracking-tight sm:text-3xl">
                    {{ __($heading) }}
                </x-ui.card.title>

                <x-ui.card.description class="mt-2 text-sm text-muted-foreground">
                    {{ __($subheading) }}
                </x-ui.card.description>
            </x-ui.card.header>

            <x-ui.card.content class="pt-6">

                {{-- Benefits checklist --}}
                <x-ui.check-list class="mb-6" aria-label="{{ __('Plan benefits') }}">
                    @foreach ($benefits as $benefit)
                        <x-ui.check-list.item>{{ __($benefit) }}</x-ui.check-list.item>
                    @endforeach
                </x-ui.check-list>

                {{-- Price display --}}
                <div class="mb-6 text-center">
                    <span class="text-4xl font-bold tracking-tight text-foreground">{{ __($price) }}</span>
                    <span class="text-sm text-muted-foreground">{{ __($period) }}</span>
                </div>

            </x-ui.card.content>

            <x-ui.card.footer class="flex flex-col gap-4 pb-8">
                <x-ui.button class="w-full" size="lg">
                    {{ __('Upgrade now') }}
                </x-ui.button>

                <x-ui.button variant="ghost" class="w-full">
                    {{ __('Maybe later') }}
                </x-ui.button>

                {{-- Social proof --}}
                <p class="mt-2 text-center text-sm text-muted-foreground">
                    <svg class="me-2 inline-block size-4 align-middle text-muted-foreground" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
                        <path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2"/>
                        <circle cx="9" cy="7" r="4"/>
                        <path d="M23 21v-2a4 4 0 00-3-3.87M16 3.13a4 4 0 010 7.75"/>
                    </svg>
                    {{ __($socialProof) }}
                </p>
            </x-ui.card.footer>

        </x-ui.card>
    </x-ui.container>
</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