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' => 'Pricing Plans',
'plans' => null,
])
@php
// Per-plan pastel surfaces expressed as semantic-token tints. Whole class
// strings are selected by key from this fixed map — never spliced — so the
// Tailwind JIT can always see them and no raw colour ever ships.
$tints = [
'primary' => 'bg-primary/5',
'secondary' => 'bg-secondary/30',
'accent' => 'bg-accent/10',
'muted' => 'bg-muted',
];
$plans ??= [
[
'name' => 'Starter',
'tint' => 'accent',
'badge' => 'Starter',
'badgeVariant' => 'secondary',
'description' => 'Everything you need to launch your first idea.',
'perfectFor' => 'Perfect for solo founders',
'credits' => '10,000 credits / mo',
'monthly' => 0,
'annual' => 0,
'cta' => 'Get started',
'href' => '#',
'features' => [
'Up to 3 projects',
'Community support',
'Basic analytics',
],
],
[
'name' => 'Growth',
'tint' => 'primary',
'badge' => 'Growth',
'badgeVariant' => 'default',
'featured' => true,
'description' => 'Scale your product as your audience grows.',
'perfectFor' => 'Perfect for growing teams',
'credits' => '100,000 credits / mo',
'monthly' => 29,
'annual' => 24,
'cta' => 'Start free trial',
'href' => '#',
'features' => [
'Unlimited projects',
'Priority support',
'Advanced analytics',
'Team collaboration',
],
],
[
'name' => 'Scale',
'tint' => 'secondary',
'badge' => 'Scale',
'badgeVariant' => 'outline',
'description' => 'Enterprise-grade controls, security, and support.',
'perfectFor' => 'Perfect for large organisations',
'credits' => 'Unlimited credits',
'custom' => 'Custom',
'cta' => 'Contact sales',
'href' => '#',
'features' => [
'Everything in Growth',
'SSO & SCIM',
'Audit logs',
'Dedicated success manager',
],
],
];
@endphp
<x-ui.section
data-slot="pricing-pastel"
x-data="{ annual: false }"
space="xl" {{ $attributes }}
>
<x-ui.container gutter="sm">
<div class="mx-auto max-w-2xl text-center">
<h2 class="text-balance text-3xl font-bold tracking-tight sm:text-4xl">{{ __($heading) }}</h2>
<div class="mt-8 inline-flex flex-wrap items-center justify-center gap-4">
<span class="text-sm font-medium" :class="! annual && 'text-foreground' || 'text-muted-foreground'">{{ __('Monthly') }}</span>
<x-ui.switch x-model="annual" aria-label="{{ __('Toggle annual billing') }}" />
<span class="text-sm font-medium" :class="annual && 'text-foreground' || 'text-muted-foreground'">{{ __('Annual') }}</span>
<x-ui.badge variant="success">{{ __('Save 18%') }}</x-ui.badge>
</div>
</div>
<div class="mx-auto mt-12 grid max-w-md grid-cols-1 items-stretch gap-6 sm:max-w-none lg:grid-cols-3">
@foreach ($plans as $plan)
@php
$featured = $plan['featured'] ?? false;
$tint = $tints[$plan['tint'] ?? 'muted'] ?? $tints['muted'];
$hasCustom = array_key_exists('custom', $plan);
$monthly = $plan['monthly'] ?? 0;
$annual = $plan['annual'] ?? $monthly;
@endphp
<x-ui.card @class([
'relative flex h-full flex-col',
$tint,
'ring-2 ring-primary shadow-lg lg:scale-105' => $featured,
])>
<x-ui.card.header>
<x-ui.badge :variant="$plan['badgeVariant'] ?? 'secondary'" class="w-fit">
{{ __($plan['badge'] ?? $plan['name']) }}
</x-ui.badge>
<x-ui.card.title class="mt-4 text-lg">{{ __($plan['name']) }}</x-ui.card.title>
@if (! empty($plan['description']))
<x-ui.card.description>{{ __($plan['description']) }}</x-ui.card.description>
@endif
@if (! empty($plan['perfectFor']))
<p class="mt-2 text-sm font-medium text-muted-foreground">{{ __($plan['perfectFor']) }}</p>
@endif
@if (! empty($plan['credits']))
<div class="mt-4 flex items-center gap-2 text-sm text-muted-foreground">
<svg class="size-4 shrink-0 text-foreground" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M10 1.5a8.5 8.5 0 100 17 8.5 8.5 0 000-17zM10.9 6a.9.9 0 10-1.8 0v4.2c0 .3.16.59.43.74l3 1.7a.9.9 0 10.88-1.57l-2.51-1.41V6z" clip-rule="evenodd" />
</svg>
<span>{{ __($plan['credits']) }}</span>
</div>
@endif
<div class="mt-4 flex items-baseline gap-2">
@if ($hasCustom)
<span class="text-3xl font-bold tracking-tight">{{ __($plan['custom']) }}</span>
@else
<span
class="text-3xl font-bold tracking-tight"
x-text="(annual ? {{ Js::from($annual) }} : {{ Js::from($monthly) }}) === 0 ? '{{ __('Free') }}' : '$' + (annual ? {{ Js::from($annual) }} : {{ Js::from($monthly) }})"
>{{ $monthly === 0 ? __('Free') : '$' . $monthly }}</span>
<span class="text-sm text-muted-foreground" x-show="(annual ? {{ Js::from($annual) }} : {{ Js::from($monthly) }}) > 0" x-cloak>{{ __('/mo') }}</span>
@endif
</div>
@unless ($hasCustom)
<p class="mt-2 text-sm text-muted-foreground" x-show="annual && {{ $monthly }} > 0" x-cloak>{{ __('billed annually') }}</p>
@endunless
</x-ui.card.header>
<x-ui.card.content class="flex flex-1 flex-col gap-6">
<x-ui.separator />
<x-ui.check-list class="flex-1">
@foreach ($plan['features'] 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 :href="$plan['href'] ?? '#'" :variant="$featured ? 'default' : 'outline'" class="w-full">
{{ __($plan['cta']) }}
</x-ui.button>
</x-ui.card.footer>
</x-ui.card>
@endforeach
</div>
</x-ui.container>
</x-ui.section>
Installation
php artisan ui:add blocks/pricing-tinted
Registry contract
Install confidence
php artisan ui:add blocks/pricing-tinted
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-tinted.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 Pastel (`pricing-tinted`)
Three tinted pricing cards with category badges, a Perfect-for line, a monthly credits row, a monthly/annual billing toggle with reactive prices, and a full-width CTA per plan.
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-tinted
```
## Render it
```blade
<x-blocks.pricing-tinted />
```
## Props
- `heading` (string, default `Pricing Plans`) — Section headline.
- `plans` (mixed|null, default `null`) — Array of tinted plan cards ({name, tint, badge, badgeVariant, description, perfectFor, credits, monthly, annual, cta, href, features}); null falls back to sample plans.
## Use when
- Presenting three tinted pricing cards, each with a category badge and a 'Perfect for' audience line.
- Needing a monthly/annual billing toggle with reactive prices plus a monthly-credits row per plan.
## Avoid when
- Needing a plain billing-toggle grid without colour tints (pricing-simple) or audience-segmented tabs (pricing-tabbed).
- Wanting one highlighted plan with a gradient border, a floating 'Most Popular' badge and a footnote per plan, and no billing toggle; use pricing-gradient. This block adds a monthly/annual switch and a per-plan badge and credits row.
## Rules
- Render the installed block with `<x-blocks.pricing-tinted />` 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-tinted
- Registry JSON (files, props, contract): https://brokui.dev/r/open/blocks/pricing-tinted.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
- Presenting three tinted pricing cards, each with a category badge and a 'Perfect for' audience line.
- Needing a monthly/annual billing toggle with reactive prices plus a monthly-credits row per plan.
Avoid when
- Needing a plain billing-toggle grid without colour tints (pricing-simple) or audience-segmented tabs (pricing-tabbed).
- Wanting one highlighted plan with a gradient border, a floating 'Most Popular' badge and a footnote per plan, and no billing toggle; use pricing-gradient. This block adds a monthly/annual switch and a per-plan badge and credits row.
Anti-patterns
- Do not replace semantic props with conflicting utility classes.
- Do not remove labels, focus styles, or state attributes.
- Anatomy
Usage
Render the block as a component, passing data where useful:
<x-blocks.pricing-tinted />
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' => 'Pricing Plans',
'plans' => null,
])
@php
// Per-plan pastel surfaces expressed as semantic-token tints. Whole class
// strings are selected by key from this fixed map — never spliced — so the
// Tailwind JIT can always see them and no raw colour ever ships.
$tints = [
'primary' => 'bg-primary/5',
'secondary' => 'bg-secondary/30',
'accent' => 'bg-accent/10',
'muted' => 'bg-muted',
];
$plans ??= [
[
'name' => 'Starter',
'tint' => 'accent',
'badge' => 'Starter',
'badgeVariant' => 'secondary',
'description' => 'Everything you need to launch your first idea.',
'perfectFor' => 'Perfect for solo founders',
'credits' => '10,000 credits / mo',
'monthly' => 0,
'annual' => 0,
'cta' => 'Get started',
'href' => '#',
'features' => [
'Up to 3 projects',
'Community support',
'Basic analytics',
],
],
[
'name' => 'Growth',
'tint' => 'primary',
'badge' => 'Growth',
'badgeVariant' => 'default',
'featured' => true,
'description' => 'Scale your product as your audience grows.',
'perfectFor' => 'Perfect for growing teams',
'credits' => '100,000 credits / mo',
'monthly' => 29,
'annual' => 24,
'cta' => 'Start free trial',
'href' => '#',
'features' => [
'Unlimited projects',
'Priority support',
'Advanced analytics',
'Team collaboration',
],
],
[
'name' => 'Scale',
'tint' => 'secondary',
'badge' => 'Scale',
'badgeVariant' => 'outline',
'description' => 'Enterprise-grade controls, security, and support.',
'perfectFor' => 'Perfect for large organisations',
'credits' => 'Unlimited credits',
'custom' => 'Custom',
'cta' => 'Contact sales',
'href' => '#',
'features' => [
'Everything in Growth',
'SSO & SCIM',
'Audit logs',
'Dedicated success manager',
],
],
];
@endphp
<x-ui.section
data-slot="pricing-pastel"
x-data="{ annual: false }"
space="xl" {{ $attributes }}
>
<x-ui.container gutter="sm">
<div class="mx-auto max-w-2xl text-center">
<h2 class="text-balance text-3xl font-bold tracking-tight sm:text-4xl">{{ __($heading) }}</h2>
<div class="mt-8 inline-flex flex-wrap items-center justify-center gap-4">
<span class="text-sm font-medium" :class="! annual && 'text-foreground' || 'text-muted-foreground'">{{ __('Monthly') }}</span>
<x-ui.switch x-model="annual" aria-label="{{ __('Toggle annual billing') }}" />
<span class="text-sm font-medium" :class="annual && 'text-foreground' || 'text-muted-foreground'">{{ __('Annual') }}</span>
<x-ui.badge variant="success">{{ __('Save 18%') }}</x-ui.badge>
</div>
</div>
<div class="mx-auto mt-12 grid max-w-md grid-cols-1 items-stretch gap-6 sm:max-w-none lg:grid-cols-3">
@foreach ($plans as $plan)
@php
$featured = $plan['featured'] ?? false;
$tint = $tints[$plan['tint'] ?? 'muted'] ?? $tints['muted'];
$hasCustom = array_key_exists('custom', $plan);
$monthly = $plan['monthly'] ?? 0;
$annual = $plan['annual'] ?? $monthly;
@endphp
<x-ui.card @class([
'relative flex h-full flex-col',
$tint,
'ring-2 ring-primary shadow-lg lg:scale-105' => $featured,
])>
<x-ui.card.header>
<x-ui.badge :variant="$plan['badgeVariant'] ?? 'secondary'" class="w-fit">
{{ __($plan['badge'] ?? $plan['name']) }}
</x-ui.badge>
<x-ui.card.title class="mt-4 text-lg">{{ __($plan['name']) }}</x-ui.card.title>
@if (! empty($plan['description']))
<x-ui.card.description>{{ __($plan['description']) }}</x-ui.card.description>
@endif
@if (! empty($plan['perfectFor']))
<p class="mt-2 text-sm font-medium text-muted-foreground">{{ __($plan['perfectFor']) }}</p>
@endif
@if (! empty($plan['credits']))
<div class="mt-4 flex items-center gap-2 text-sm text-muted-foreground">
<svg class="size-4 shrink-0 text-foreground" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M10 1.5a8.5 8.5 0 100 17 8.5 8.5 0 000-17zM10.9 6a.9.9 0 10-1.8 0v4.2c0 .3.16.59.43.74l3 1.7a.9.9 0 10.88-1.57l-2.51-1.41V6z" clip-rule="evenodd" />
</svg>
<span>{{ __($plan['credits']) }}</span>
</div>
@endif
<div class="mt-4 flex items-baseline gap-2">
@if ($hasCustom)
<span class="text-3xl font-bold tracking-tight">{{ __($plan['custom']) }}</span>
@else
<span
class="text-3xl font-bold tracking-tight"
x-text="(annual ? {{ Js::from($annual) }} : {{ Js::from($monthly) }}) === 0 ? '{{ __('Free') }}' : '$' + (annual ? {{ Js::from($annual) }} : {{ Js::from($monthly) }})"
>{{ $monthly === 0 ? __('Free') : '$' . $monthly }}</span>
<span class="text-sm text-muted-foreground" x-show="(annual ? {{ Js::from($annual) }} : {{ Js::from($monthly) }}) > 0" x-cloak>{{ __('/mo') }}</span>
@endif
</div>
@unless ($hasCustom)
<p class="mt-2 text-sm text-muted-foreground" x-show="annual && {{ $monthly }} > 0" x-cloak>{{ __('billed annually') }}</p>
@endunless
</x-ui.card.header>
<x-ui.card.content class="flex flex-1 flex-col gap-6">
<x-ui.separator />
<x-ui.check-list class="flex-1">
@foreach ($plan['features'] 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 :href="$plan['href'] ?? '#'" :variant="$featured ? 'default' : 'outline'" class="w-full">
{{ __($plan['cta']) }}
</x-ui.button>
</x-ui.card.footer>
</x-ui.card>
@endforeach
</div>
</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.8 - Status
- Stable
- License
-
open - Deprecation
- Not deprecated
- Contract
-
v1 - Foundation
-
≥ 1.0.0