Skip to content
Guides
Navigation
Feedback
Overlays
Layout
Data Display
Forms
.md

Pricing

pricing-11

Centred heading and Monthly / Yearly tabs over two plan cards: name, price, button, then a feature list.

Open full screen

Installation

php artisan ui:add-block pricing-11

A single command installs the block's Blade file and every component it depends on. Render it in your own layout as <x-ui.blocks.pricing-11 />.

Usage

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.

<x-ui.blocks.pricing-11
    tagline="Pricing"
    heading="Pick a plan"
    description="Cancel any time."
    monthly-label="Monthly"
    yearly-label="Yearly"
    :plans="[
        [
            'name' => 'Starter',
            'description' => 'For side projects',
            'price' => '$9',
            'period' => '/mo',
            'yearlyPrice' => '$90',
            'yearlyPeriod' => '/yr',
            'buttonLabel' => 'Start free',
            'buttonHref' => '/register',
            'features' => ['3 projects', 'Email support'],
        ],
    ]"
/>

Props

Every prop with its default. Pass any of them as attributes, using : to bind a PHP value.

@props([
    'tagline' => 'Tagline',
    'heading' => 'Pricing plan',
    'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
    'monthlyLabel' => 'Monthly',
    'yearlyLabel' => 'Yearly',
    'plans' => [
        [
            'name' => 'Basic plan',
            'description' => 'Lorem ipsum dolor sit amet',
            'price' => '$19',
            'period' => '/mo',
            'yearlyPrice' => '$199',
            'yearlyPeriod' => '/yr',
            'buttonLabel' => 'Get started',
            'buttonHref' => null,
            'features' => array_fill(0, 3, 'Feature text goes here'),
        ],
        [
            'name' => 'Business plan',
            'description' => 'Lorem ipsum dolor sit amet',
            'price' => '$29',
            'period' => '/mo',
            'yearlyPrice' => '$299',
            'yearlyPeriod' => '/yr',
            'buttonLabel' => 'Get started',
            'buttonHref' => null,
            'features' => array_fill(0, 5, 'Feature text goes here'),
        ],
    ],
])