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

التخطيط

scroll-area

منطقة قابلة للتمرير بشريط تمرير منسّق حسب السمة.

الإصدارات

v0.1.0
v0.2.0
v0.3.0
v0.4.0
v0.5.0
v0.6.0
v0.7.0
v0.8.0
v0.9.0
v0.10.0
v0.11.0
v0.12.0
v0.13.0
v0.14.0
v0.15.0
v0.16.0
v0.17.0
v0.18.0
v0.19.0
v0.20.0

التثبيت

php artisan ui:add scroll-area

الاستخدام

<x-ui.scroll-area class="h-48 w-full max-w-xs rounded-md border p-4">
    {{-- The height comes from `class`; without one there is nothing to scroll. --}}
    @foreach ($releases as $release)
        <div class="border-b py-2 text-sm last:border-b-0">{{ $release }}</div>
    @endforeach
</x-ui.scroll-area>

{{-- horizontal scrolls sideways instead; give it a width, not a height --}}
<x-ui.scroll-area orientation="horizontal" class="w-full max-w-xs rounded-md border p-4">
    <div class="flex gap-4">
        @foreach ($covers as $cover)
            <img src="{{ $cover }}" alt="" class="size-32 shrink-0 rounded-md" />
        @endforeach
    </div>
</x-ui.scroll-area>

تمرير أصلي، بلا JavaScript وبلا شريط تمرير مصطنع. حدّد height أو max-height عبر class وإلا فلن يتم التمرير. الاتجاهات: vertical وhorizontal وboth.

الخصائص

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

@props([
    'orientation' => 'vertical',
])