انتقل إلى المحتوى
الأدلة
التنقل
التنبيهات
الطبقات العائمة
التخطيط
عرض البيانات
النماذج
.md

الأسعار

pricing-09

مبدّل شهري/سنوي (تبويبات) فوق بطاقتي أسعار في المنتصف، لكل منهما سعر وقائمة ميزات بعلامات صح وزر بعرض كامل.

فتح بملء الشاشة

التثبيت

php artisan ui:add-block pricing-09

أمر واحد يثبّت ملف Blade الخاص بالقالب وكل مكوّن يعتمد عليه. اعرضه في تخطيطك كالتالي <x-ui.blocks.pricing-09 />.

المكونات المضمّنة

الاستخدام

Every piece of content is a prop, so you can drive this section from a CMS. periods labels the switch (key => label), and plans holds one list of plans per period key. A plan is ['name', 'price', 'period', 'features', 'buttonLabel', 'buttonHref']. The switch is the tabs component.

<x-ui.blocks.pricing-09
    heading="Simple pricing"
    :periods="['monthly' => 'Monthly', 'yearly' => 'Yearly (save 20%)']"
    :plans="[
        'monthly' => [
            ['name' => 'Solo', 'price' => '$9', 'period' => '/mo', 'features' => ['1 seat'], 'buttonHref' => '/register'],
            ['name' => 'Team', 'price' => '$29', 'period' => '/mo', 'features' => ['20 seats', 'SSO'], 'buttonHref' => '/register?plan=team'],
        ],
        'yearly' => [
            ['name' => 'Solo', 'price' => '$86', 'period' => '/yr', 'features' => ['1 seat'], 'buttonHref' => '/register?yearly=1'],
            ['name' => 'Team', 'price' => '$278', 'period' => '/yr', 'features' => ['20 seats', 'SSO'], 'buttonHref' => '/register?plan=team&yearly=1'],
        ],
    ]"
/>

الخصائص

كل خاصية مع قيمتها الافتراضية. مرّر أيًّا منها كسمة، واستخدم : لربط قيمة PHP.

@props([
    'tagline' => 'Tagline',
    'heading' => 'Pricing plan',
    'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
    'periods' => ['monthly' => 'Monthly', 'yearly' => 'Yearly'],
    'plans' => [
        'monthly' => [
            [
                'name' => 'Basic plan',
                'price' => '$19',
                'period' => '/mo',
                'features' => ['Feature text goes here', 'Feature text goes here', 'Feature text goes here'],
                'buttonLabel' => 'Get started',
                'buttonHref' => null,
            ],
            [
                'name' => 'Business plan',
                'price' => '$29',
                'period' => '/mo',
                'features' => [
                    'Feature text goes here',
                    'Feature text goes here',
                    'Feature text goes here',
                    'Feature text goes here',
                    'Feature text goes here',
                ],
                'buttonLabel' => 'Get started',
                'buttonHref' => null,
            ],
        ],
        'yearly' => [
            [
                'name' => 'Basic plan',
                'price' => '$190',
                'period' => '/yr',
                'features' => ['Feature text goes here', 'Feature text goes here', 'Feature text goes here'],
                'buttonLabel' => 'Get started',
                'buttonHref' => null,
            ],
            [
                'name' => 'Business plan',
                'price' => '$290',
                'period' => '/yr',
                'features' => [
                    'Feature text goes here',
                    'Feature text goes here',
                    'Feature text goes here',
                    'Feature text goes here',
                    'Feature text goes here',
                ],
                'buttonLabel' => 'Get started',
                'buttonHref' => null,
            ],
        ],
    ],
])