--- title: "pricing-10" description: "Two plan cards with icon, price and a two-column feature list, plus Monthly \/ Yearly tabs beside a left-aligned heading." category: "Pricing" --- # pricing-10 Two plan cards with icon, price and a two-column feature list, plus Monthly / Yearly tabs beside a left-aligned heading. ## Installation ```bash php artisan ui:add-block pricing-10 ``` ## Dependencies - composer: `gehrisandro/tailwind-merge-laravel` - component: [button](https://laralcn-ui.abdulkadersafi.com/ar/components/button.md) — the CLI installs it for you. - component: [card](https://laralcn-ui.abdulkadersafi.com/ar/components/card.md) — the CLI installs it for you. - component: [separator](https://laralcn-ui.abdulkadersafi.com/ar/components/separator.md) — the CLI installs it for you. - component: [tabs](https://laralcn-ui.abdulkadersafi.com/ar/components/tabs.md) — the CLI installs it for you. ## Source `resources/views/components/ui/blocks/pricing-10.blade.php` ```blade {{-- Every piece of content is a prop, so you can drive this section from a CMS. Each plan carries a monthly price (price + period) and a yearly one (yearlyPrice + yearlyPeriod); the Monthly / Yearly tabs swap between them. Pass 'icon' => '' on a plan to replace the default logo tile. --}} @props([ 'tagline' => 'Tagline', 'heading' => 'Pricing plan', 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique.', 'monthlyLabel' => 'Monthly', 'yearlyLabel' => 'Yearly', 'includesLabel' => 'Includes:', 'plans' => [ [ 'name' => 'Basic plan', 'description' => 'Lorem ipsum dolor sit amet', 'price' => '$19', 'period' => '/mo', 'yearlyPrice' => '$199', 'yearlyPeriod' => '/yr', 'features' => array_fill(0, 6, 'Feature text goes here'), 'buttonLabel' => 'Get started', 'buttonHref' => null, ], [ 'name' => 'Business plan', 'description' => 'Lorem ipsum dolor sit amet', 'price' => '$29', 'period' => '/mo', 'yearlyPrice' => '$299', 'yearlyPeriod' => '/yr', 'features' => array_fill(0, 10, 'Feature text goes here'), 'buttonLabel' => 'Get started', 'buttonHref' => null, ], ], ])
merge(['class' => 'w-full bg-background px-[5%] py-16 text-foreground md:py-24 lg:py-28']) }}> {{-- The tabs root is display:contents here, so its tab strip and panels join this grid: the strip sits beside the heading on desktop and the panels span the full row below. --}}
@if ($tagline)

{{ $tagline }}

@endif

{{ $heading }}

@if ($description)

{{ $description }}

@endif
@foreach (['monthly', 'yearly'] as $billing)
@foreach ($plans as $plan) @php $price = $billing === 'yearly' ? $plan['yearlyPrice'] ?? '' : $plan['price'] ?? ''; $period = $billing === 'yearly' ? $plan['yearlyPeriod'] ?? '' : $plan['period'] ?? ''; @endphp
@if (!empty($plan['icon'])) {!! $plan['icon'] !!} @else @endif

{{ $plan['name'] ?? '' }}

@if (!empty($plan['description']))

{{ $plan['description'] }}

@endif

{{ $price }}{{ $period }}

@if ($includesLabel)

{{ $includesLabel }}

@endif
    @foreach ($plan['features'] ?? [] as $feature)
  • {{ $feature }}
  • @endforeach
{{ $plan['buttonLabel'] ?? 'Get started' }}
@endforeach
@endforeach
```