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

شريط التنقل

navbar-06

شريط تنقل عائم على شكل كبسولة منفصل عن الحافة العلوية، بروابط في الوسط وقائمة منسدلة وإجراءين. يتحول إلى لوحة على الجوال.

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

التثبيت

php artisan ui:add-block navbar-06

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

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

الاستخدام

Every piece of content is a prop, so you can drive this navbar from a CMS. A link is either a plain string or ['label' => ..., 'href' => ...]. An action is ['label' =>, 'href' =>, 'variant' =>]; give it an href and it renders as a link, leave href out and it stays a plain button. Variants are default, outline, secondary, ghost, link and destructive. Pass :menu-label="false" to drop the dropdown entirely.

<x-ui.blocks.navbar-06
    brand="Acme"
    brand-href="/"
    :links="[
        ['label' => 'Product', 'href' => '/product'],
        ['label' => 'Pricing', 'href' => '/pricing'],
        'Customers',
    ]"
    menu-label="Resources"
    :menu-links="[
        ['label' => 'Docs', 'href' => '/docs'],
        ['label' => 'Changelog', 'href' => '/changelog'],
        ['label' => 'Status', 'href' => 'https://status.acme.com'],
    ]"
    :actions="[
        ['label' => 'Sign in', 'href' => route('login'), 'variant' => 'ghost'],
        ['label' => 'Start free', 'href' => route('register'), 'variant' => 'default'],
    ]"
/>

الخصائص

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

@props([
    'brand' => 'LaralCN',
    'brandHref' => '#',
    'links' => ['Link One', 'Link Two', 'Link Three'],
    'menuLabel' => 'Link Four',
    'menuLinks' => ['Link Five', 'Link Six', 'Link Seven'],
    'actions' => [
        ['label' => 'Sign in', 'href' => null, 'variant' => 'ghost'],
        ['label' => 'Get Started', 'href' => null, 'variant' => 'default'],
    ],
])