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

النماذج

button

زر قابل للنقر مع خيارات للنمط والحجم.

التثبيت

php artisan ui:add button

الاستخدام

<x-ui.button>Save</x-ui.button>
<x-ui.button variant="outline" size="lg">Cancel</x-ui.button>
<x-ui.button variant="destructive" size="sm">Delete</x-ui.button>
<x-ui.button type="submit">Submit the form</x-ui.button>

{{-- With an href it renders an <a> carrying the same styles --}}
<x-ui.button variant="ghost" href="/pricing">See pricing</x-ui.button>

يستخدم رموز السمة التي يحقنها php artisan ui:init.

الخصائص

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

@props([
    'variant' => 'default',
    'size' => 'md',
    'type' => 'button',
    'href' => null,
])