Pricing
Pricing sections — from a simple three-tier table (with an optional billing-period toggle) to gradient and elevated cards, tinted and horizontal layouts, and a tabbed switcher.
Preview
@props([
'heading' => 'Simple, usage-based pricing',
'subheading' => 'Pay only for what you use. Scale up or down any time — no surprises.',
])
<x-ui.section
space="xl" {{ $attributes }}
x-data="{
annual: false,
prices: { starter: 19, pro: 49, scale: 99 },
price(key) {
const base = this.prices[key];
return this.annual ? Math.round(base * 0.8) : base;
},
init() {},
destroy() {}
}"
>
{{-- Header --}}
<div class="mx-auto max-w-2xl px-4 text-center">
<h2 class="text-3xl font-bold tracking-tight sm:text-4xl">{{ __($heading) }}</h2>
@if ($subheading)
<p class="mt-4 text-lg text-muted-foreground">{{ __($subheading) }}</p>
@endif
</div>
{{-- Billing toggle --}}
<div class="mx-auto mt-10 flex max-w-xs items-center justify-center gap-4 px-4">
<span
class="text-sm font-medium transition-colors"
:class="!annual ? 'text-foreground' : 'text-muted-foreground'"
>{{ __('Monthly') }}</span>
<x-ui.switch x-model="annual" aria-label="{{ __('Toggle annual billing') }}" />
<span
class="flex items-center gap-2 text-sm font-medium transition-colors"
:class="annual ? 'text-foreground' : 'text-muted-foreground'"
>
{{ __('Annual') }}
<x-ui.badge variant="success">{{ __('Save 20%') }}</x-ui.badge>
</span>
</div>
{{-- Tier cards --}}
<div class="mx-auto mt-12 grid max-w-5xl grid-cols-1 gap-6 px-4 sm:grid-cols-2 lg:grid-cols-3">
{{-- Starter --}}
<x-ui.card>
<x-ui.card.header>
<x-ui.card.title>{{ __('Starter') }}</x-ui.card.title>
<x-ui.card.description>{{ __('Great for indie makers and small projects.') }}</x-ui.card.description>
</x-ui.card.header>
<x-ui.card.content class="flex flex-col gap-6">
{{-- Price --}}
<div>
<div class="flex items-end gap-2">
<span class="text-3xl font-bold tracking-tight text-foreground" aria-live="polite">
$<span x-text="price('starter')"></span>
</span>
<span class="mb-2 text-sm text-muted-foreground">/{{ __('mo') }}</span>
</div>
<p class="mt-2 h-4 text-sm text-muted-foreground" x-show="annual">{{ __('billed annually') }}</p>
</div>
{{-- Usage limits --}}
<div class="rounded-md border border-border bg-muted/50 p-4">
<p class="mb-4 text-sm font-semibold uppercase tracking-wider text-muted-foreground">{{ __('Usage limits') }}</p>
<dl class="space-y-2">
<div class="grid grid-cols-[1fr_auto] items-center text-sm">
<dt class="text-muted-foreground">{{ __('API calls') }}</dt>
<dd class="font-semibold text-foreground">{{ __('100k / mo') }}</dd>
<dd class="col-span-2 mt-2" aria-hidden="true">
<div class="h-1 w-full overflow-hidden rounded-full bg-border">
<div class="h-full w-1/4 rounded-full bg-primary/40"></div>
</div>
</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Storage') }}</dt>
<dd class="font-semibold text-foreground">{{ __('5 GB') }}</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Seats') }}</dt>
<dd class="font-semibold text-foreground">{{ __('3') }}</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Projects') }}</dt>
<dd class="font-semibold text-foreground">{{ __('5') }}</dd>
</div>
</dl>
</div>
{{-- Feature list --}}
<x-ui.check-list size="sm" class="text-muted-foreground">
@foreach (['Community support', 'Basic analytics', 'API access', 'SSL & CDN'] as $feature)
<x-ui.check-list.item>{{ __($feature) }}</x-ui.check-list.item>
@endforeach
</x-ui.check-list>
</x-ui.card.content>
<x-ui.card.footer>
<x-ui.button variant="outline" class="w-full">{{ __('Get started') }}</x-ui.button>
</x-ui.card.footer>
</x-ui.card>
{{-- Pro (highlighted) --}}
<x-ui.card class="relative border-primary ring-1 ring-ring">
{{-- Most popular badge --}}
<div class="absolute -top-3 start-1/2 -translate-x-1/2 rtl:translate-x-1/2">
<x-ui.badge variant="default">{{ __('Most popular') }}</x-ui.badge>
</div>
<x-ui.card.header class="pt-8">
<x-ui.card.title>{{ __('Pro') }}</x-ui.card.title>
<x-ui.card.description>{{ __('For growing teams who need more power.') }}</x-ui.card.description>
</x-ui.card.header>
<x-ui.card.content class="flex flex-col gap-6">
{{-- Price --}}
<div>
<div class="flex items-end gap-2">
<span class="text-3xl font-bold tracking-tight text-foreground" aria-live="polite">
$<span x-text="price('pro')"></span>
</span>
<span class="mb-2 text-sm text-muted-foreground">/{{ __('mo') }}</span>
</div>
<p class="mt-2 h-4 text-sm text-muted-foreground" x-show="annual">{{ __('billed annually') }}</p>
</div>
{{-- Usage limits --}}
<div class="rounded-md border border-primary/30 bg-primary/5 p-4">
<p class="mb-4 text-sm font-semibold uppercase tracking-wider text-muted-foreground">{{ __('Usage limits') }}</p>
<dl class="space-y-2">
<div class="grid grid-cols-[1fr_auto] items-center text-sm">
<dt class="text-muted-foreground">{{ __('API calls') }}</dt>
<dd class="font-semibold text-foreground">{{ __('1M / mo') }}</dd>
<dd class="col-span-2 mt-2" aria-hidden="true">
<div class="h-1 w-full overflow-hidden rounded-full bg-border">
<div class="h-full w-1/2 rounded-full bg-primary/60"></div>
</div>
</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Storage') }}</dt>
<dd class="font-semibold text-foreground">{{ __('50 GB') }}</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Seats') }}</dt>
<dd class="font-semibold text-foreground">{{ __('20') }}</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Projects') }}</dt>
<dd class="font-semibold text-foreground">{{ __('Unlimited') }}</dd>
</div>
</dl>
</div>
{{-- Feature list --}}
<x-ui.check-list size="sm" class="text-muted-foreground">
@foreach (['Priority email support', 'Advanced analytics', 'API access', 'SSL & CDN', 'Custom domains', 'Team roles & permissions'] as $feature)
<x-ui.check-list.item>{{ __($feature) }}</x-ui.check-list.item>
@endforeach
</x-ui.check-list>
</x-ui.card.content>
<x-ui.card.footer>
<x-ui.button variant="default" class="w-full">{{ __('Get started') }}</x-ui.button>
</x-ui.card.footer>
</x-ui.card>
{{-- Scale --}}
<x-ui.card>
<x-ui.card.header>
<x-ui.card.title>{{ __('Scale') }}</x-ui.card.title>
<x-ui.card.description>{{ __('Enterprise-grade for high-volume production workloads.') }}</x-ui.card.description>
</x-ui.card.header>
<x-ui.card.content class="flex flex-col gap-6">
{{-- Price --}}
<div>
<div class="flex items-end gap-2">
<span class="text-3xl font-bold tracking-tight text-foreground" aria-live="polite">
$<span x-text="price('scale')"></span>
</span>
<span class="mb-2 text-sm text-muted-foreground">/{{ __('mo') }}</span>
</div>
<p class="mt-2 h-4 text-sm text-muted-foreground" x-show="annual">{{ __('billed annually') }}</p>
</div>
{{-- Usage limits --}}
<div class="rounded-md border border-border bg-muted/50 p-4">
<p class="mb-4 text-sm font-semibold uppercase tracking-wider text-muted-foreground">{{ __('Usage limits') }}</p>
<dl class="space-y-2">
<div class="grid grid-cols-[1fr_auto] items-center text-sm">
<dt class="text-muted-foreground">{{ __('API calls') }}</dt>
<dd class="font-semibold text-foreground">{{ __('Unlimited') }}</dd>
<dd class="col-span-2 mt-2" aria-hidden="true">
<div class="h-1 w-full overflow-hidden rounded-full bg-border">
<div class="h-full w-full rounded-full bg-primary"></div>
</div>
</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Storage') }}</dt>
<dd class="font-semibold text-foreground">{{ __('500 GB') }}</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Seats') }}</dt>
<dd class="font-semibold text-foreground">{{ __('Unlimited') }}</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Projects') }}</dt>
<dd class="font-semibold text-foreground">{{ __('Unlimited') }}</dd>
</div>
</dl>
</div>
{{-- Feature list --}}
<x-ui.check-list size="sm" class="text-muted-foreground">
@foreach (['Dedicated Slack support', 'Custom analytics & exports', 'API access', 'SSL & CDN', 'Custom domains', 'SSO & SCIM', 'SLA 99.99%'] as $feature)
<x-ui.check-list.item>{{ __($feature) }}</x-ui.check-list.item>
@endforeach
</x-ui.check-list>
</x-ui.card.content>
<x-ui.card.footer>
<x-ui.button variant="outline" class="w-full">{{ __('Contact sales') }}</x-ui.button>
</x-ui.card.footer>
</x-ui.card>
</div>
</x-ui.section>
Installation
php artisan ui:add blocks/pricing-usage
Registry contract
Install confidence
php artisan ui:add blocks/pricing-usage
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.8
- License
- open
- Stability
- stable
- Contract
- v1
- Foundation
- ≥ 1.0.0
| Type | Generated target |
|---|---|
| blade | resources/views/blocks/pricing-usage.blade.php |
Registry dependencies
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.
# Brok UI block: Pricing Usage (`pricing-usage`)
Usage-based pricing section with a monthly/annual billing toggle (20% discount), three metered tier cards showing API call and storage limits, feature checklists, and a highlighted Pro tier.
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/pricing-usage
```
## Render it
```blade
<x-blocks.pricing-usage />
```
## Use when
- A SaaS product prices plans by metered usage and needs monthly/annual comparison.
## Avoid when
- The offer has a single fixed price or requires a detailed comparison matrix.
## Rules
- Render the installed block with `<x-blocks.pricing-usage />` 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/pricing-usage
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/pricing-usage.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
- A SaaS product prices plans by metered usage and needs monthly/annual comparison.
Avoid when
- The offer has a single fixed price or requires a detailed comparison matrix.
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:
<x-blocks.pricing-usage />
Built from primitives
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.
@props([
'heading' => 'Simple, usage-based pricing',
'subheading' => 'Pay only for what you use. Scale up or down any time — no surprises.',
])
<x-ui.section
space="xl" {{ $attributes }}
x-data="{
annual: false,
prices: { starter: 19, pro: 49, scale: 99 },
price(key) {
const base = this.prices[key];
return this.annual ? Math.round(base * 0.8) : base;
},
init() {},
destroy() {}
}"
>
{{-- Header --}}
<div class="mx-auto max-w-2xl px-4 text-center">
<h2 class="text-3xl font-bold tracking-tight sm:text-4xl">{{ __($heading) }}</h2>
@if ($subheading)
<p class="mt-4 text-lg text-muted-foreground">{{ __($subheading) }}</p>
@endif
</div>
{{-- Billing toggle --}}
<div class="mx-auto mt-10 flex max-w-xs items-center justify-center gap-4 px-4">
<span
class="text-sm font-medium transition-colors"
:class="!annual ? 'text-foreground' : 'text-muted-foreground'"
>{{ __('Monthly') }}</span>
<x-ui.switch x-model="annual" aria-label="{{ __('Toggle annual billing') }}" />
<span
class="flex items-center gap-2 text-sm font-medium transition-colors"
:class="annual ? 'text-foreground' : 'text-muted-foreground'"
>
{{ __('Annual') }}
<x-ui.badge variant="success">{{ __('Save 20%') }}</x-ui.badge>
</span>
</div>
{{-- Tier cards --}}
<div class="mx-auto mt-12 grid max-w-5xl grid-cols-1 gap-6 px-4 sm:grid-cols-2 lg:grid-cols-3">
{{-- Starter --}}
<x-ui.card>
<x-ui.card.header>
<x-ui.card.title>{{ __('Starter') }}</x-ui.card.title>
<x-ui.card.description>{{ __('Great for indie makers and small projects.') }}</x-ui.card.description>
</x-ui.card.header>
<x-ui.card.content class="flex flex-col gap-6">
{{-- Price --}}
<div>
<div class="flex items-end gap-2">
<span class="text-3xl font-bold tracking-tight text-foreground" aria-live="polite">
$<span x-text="price('starter')"></span>
</span>
<span class="mb-2 text-sm text-muted-foreground">/{{ __('mo') }}</span>
</div>
<p class="mt-2 h-4 text-sm text-muted-foreground" x-show="annual">{{ __('billed annually') }}</p>
</div>
{{-- Usage limits --}}
<div class="rounded-md border border-border bg-muted/50 p-4">
<p class="mb-4 text-sm font-semibold uppercase tracking-wider text-muted-foreground">{{ __('Usage limits') }}</p>
<dl class="space-y-2">
<div class="grid grid-cols-[1fr_auto] items-center text-sm">
<dt class="text-muted-foreground">{{ __('API calls') }}</dt>
<dd class="font-semibold text-foreground">{{ __('100k / mo') }}</dd>
<dd class="col-span-2 mt-2" aria-hidden="true">
<div class="h-1 w-full overflow-hidden rounded-full bg-border">
<div class="h-full w-1/4 rounded-full bg-primary/40"></div>
</div>
</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Storage') }}</dt>
<dd class="font-semibold text-foreground">{{ __('5 GB') }}</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Seats') }}</dt>
<dd class="font-semibold text-foreground">{{ __('3') }}</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Projects') }}</dt>
<dd class="font-semibold text-foreground">{{ __('5') }}</dd>
</div>
</dl>
</div>
{{-- Feature list --}}
<x-ui.check-list size="sm" class="text-muted-foreground">
@foreach (['Community support', 'Basic analytics', 'API access', 'SSL & CDN'] as $feature)
<x-ui.check-list.item>{{ __($feature) }}</x-ui.check-list.item>
@endforeach
</x-ui.check-list>
</x-ui.card.content>
<x-ui.card.footer>
<x-ui.button variant="outline" class="w-full">{{ __('Get started') }}</x-ui.button>
</x-ui.card.footer>
</x-ui.card>
{{-- Pro (highlighted) --}}
<x-ui.card class="relative border-primary ring-1 ring-ring">
{{-- Most popular badge --}}
<div class="absolute -top-3 start-1/2 -translate-x-1/2 rtl:translate-x-1/2">
<x-ui.badge variant="default">{{ __('Most popular') }}</x-ui.badge>
</div>
<x-ui.card.header class="pt-8">
<x-ui.card.title>{{ __('Pro') }}</x-ui.card.title>
<x-ui.card.description>{{ __('For growing teams who need more power.') }}</x-ui.card.description>
</x-ui.card.header>
<x-ui.card.content class="flex flex-col gap-6">
{{-- Price --}}
<div>
<div class="flex items-end gap-2">
<span class="text-3xl font-bold tracking-tight text-foreground" aria-live="polite">
$<span x-text="price('pro')"></span>
</span>
<span class="mb-2 text-sm text-muted-foreground">/{{ __('mo') }}</span>
</div>
<p class="mt-2 h-4 text-sm text-muted-foreground" x-show="annual">{{ __('billed annually') }}</p>
</div>
{{-- Usage limits --}}
<div class="rounded-md border border-primary/30 bg-primary/5 p-4">
<p class="mb-4 text-sm font-semibold uppercase tracking-wider text-muted-foreground">{{ __('Usage limits') }}</p>
<dl class="space-y-2">
<div class="grid grid-cols-[1fr_auto] items-center text-sm">
<dt class="text-muted-foreground">{{ __('API calls') }}</dt>
<dd class="font-semibold text-foreground">{{ __('1M / mo') }}</dd>
<dd class="col-span-2 mt-2" aria-hidden="true">
<div class="h-1 w-full overflow-hidden rounded-full bg-border">
<div class="h-full w-1/2 rounded-full bg-primary/60"></div>
</div>
</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Storage') }}</dt>
<dd class="font-semibold text-foreground">{{ __('50 GB') }}</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Seats') }}</dt>
<dd class="font-semibold text-foreground">{{ __('20') }}</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Projects') }}</dt>
<dd class="font-semibold text-foreground">{{ __('Unlimited') }}</dd>
</div>
</dl>
</div>
{{-- Feature list --}}
<x-ui.check-list size="sm" class="text-muted-foreground">
@foreach (['Priority email support', 'Advanced analytics', 'API access', 'SSL & CDN', 'Custom domains', 'Team roles & permissions'] as $feature)
<x-ui.check-list.item>{{ __($feature) }}</x-ui.check-list.item>
@endforeach
</x-ui.check-list>
</x-ui.card.content>
<x-ui.card.footer>
<x-ui.button variant="default" class="w-full">{{ __('Get started') }}</x-ui.button>
</x-ui.card.footer>
</x-ui.card>
{{-- Scale --}}
<x-ui.card>
<x-ui.card.header>
<x-ui.card.title>{{ __('Scale') }}</x-ui.card.title>
<x-ui.card.description>{{ __('Enterprise-grade for high-volume production workloads.') }}</x-ui.card.description>
</x-ui.card.header>
<x-ui.card.content class="flex flex-col gap-6">
{{-- Price --}}
<div>
<div class="flex items-end gap-2">
<span class="text-3xl font-bold tracking-tight text-foreground" aria-live="polite">
$<span x-text="price('scale')"></span>
</span>
<span class="mb-2 text-sm text-muted-foreground">/{{ __('mo') }}</span>
</div>
<p class="mt-2 h-4 text-sm text-muted-foreground" x-show="annual">{{ __('billed annually') }}</p>
</div>
{{-- Usage limits --}}
<div class="rounded-md border border-border bg-muted/50 p-4">
<p class="mb-4 text-sm font-semibold uppercase tracking-wider text-muted-foreground">{{ __('Usage limits') }}</p>
<dl class="space-y-2">
<div class="grid grid-cols-[1fr_auto] items-center text-sm">
<dt class="text-muted-foreground">{{ __('API calls') }}</dt>
<dd class="font-semibold text-foreground">{{ __('Unlimited') }}</dd>
<dd class="col-span-2 mt-2" aria-hidden="true">
<div class="h-1 w-full overflow-hidden rounded-full bg-border">
<div class="h-full w-full rounded-full bg-primary"></div>
</div>
</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Storage') }}</dt>
<dd class="font-semibold text-foreground">{{ __('500 GB') }}</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Seats') }}</dt>
<dd class="font-semibold text-foreground">{{ __('Unlimited') }}</dd>
</div>
<div class="flex items-center justify-between text-sm">
<dt class="text-muted-foreground">{{ __('Projects') }}</dt>
<dd class="font-semibold text-foreground">{{ __('Unlimited') }}</dd>
</div>
</dl>
</div>
{{-- Feature list --}}
<x-ui.check-list size="sm" class="text-muted-foreground">
@foreach (['Dedicated Slack support', 'Custom analytics & exports', 'API access', 'SSL & CDN', 'Custom domains', 'SSO & SCIM', 'SLA 99.99%'] as $feature)
<x-ui.check-list.item>{{ __($feature) }}</x-ui.check-list.item>
@endforeach
</x-ui.check-list>
</x-ui.card.content>
<x-ui.card.footer>
<x-ui.button variant="outline" class="w-full">{{ __('Contact sales') }}</x-ui.button>
</x-ui.card.footer>
</x-ui.card>
</div>
</x-ui.section>
Ownership & lifecycle
Owner, release state, review evidence and adoption for this item.
- Owner
- Platform UI (@JoshJML)
- Current version
-
1.0.8 - Status
- Stable
- License
-
open - Deprecation
- Not deprecated
- Contract
-
v1 - Foundation
-
≥ 1.0.0