Table

Normal table + x-table-scroll wrapper adds left/right scroll buttons and gradient fades when overflow. Wrapper stays transparent (adds nothing) when content fits. Not table-only; works with card lists, image strips, etc.

plain table — no <x-table-scroll> wrapper (narrow content)

ID Name Status
1Tanakaactive
2Yamadainactive
3Satoactive
<table class="w-full text-sm">
    <thead class="bg-base-200 text-base-content/70">
        <tr>
            <th class="px-4 py-2 text-left font-medium">ID</th>
            <th class="px-4 py-2 text-left font-medium">Name</th>
            <th class="px-4 py-2 text-left font-medium">Status</th>
        </tr>
    </thead>
    <tbody>
        <tr class="border-t border-base-300 hover:bg-base-200/50"><td class="px-4 py-2">1</td><td class="px-4 py-2">Tanaka</td><td class="px-4 py-2">active</td></tr>
        <tr class="border-t border-base-300 hover:bg-base-200/50"><td class="px-4 py-2">2</td><td class="px-4 py-2">Yamada</td><td class="px-4 py-2">inactive</td></tr>
        <tr class="border-t border-base-300 hover:bg-base-200/50"><td class="px-4 py-2">3</td><td class="px-4 py-2">Sato</td><td class="px-4 py-2">active</td></tr>
    </tbody>
</table>
Loading…
Couldn't load the HTML

Basic form

ID Username Email Company Department Title Joined Last login Role Plan Status Action
1001tatun55tatun@example.comYakaze Tech StudioDevelopmentCEO2024-04-012026-05-13 09:32adminenterpriseactive
1002akari_yakari@example.comSparrowhawk LabsDesignLead2024-09-152026-05-13 08:11editorproactive
1003kenji_okenji@example.comPinion Inc.SalesManager2025-02-012026-05-12 22:54editorproinvited
<x-table-scroll>
    <table class="min-w-[1000px] w-full text-sm">
        <thead class="bg-base-200 text-base-content/70">
            <tr>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">ID</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Username</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Email</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Company</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Department</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Title</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Joined</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Last login</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Role</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Plan</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Status</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Action</th>
            </tr>
        </thead>
        <tbody>
            <tr class="border-t border-base-300 hover:bg-base-200/50">
                <td class="px-4 py-2 whitespace-nowrap">1001</td><td class="px-4 py-2 whitespace-nowrap">tatun55</td><td class="px-4 py-2 whitespace-nowrap">tatun@example.com</td><td class="px-4 py-2 whitespace-nowrap">Yakaze Tech Studio</td><td class="px-4 py-2 whitespace-nowrap">Development</td><td class="px-4 py-2 whitespace-nowrap">CEO</td><td class="px-4 py-2 whitespace-nowrap">2024-04-01</td><td class="px-4 py-2 whitespace-nowrap">2026-05-13 09:32</td><td class="px-4 py-2 whitespace-nowrap">admin</td><td class="px-4 py-2 whitespace-nowrap">enterprise</td><td class="px-4 py-2 whitespace-nowrap">active</td>
                <td class="px-4 py-2 whitespace-nowrap"><x-button color="primary" appearance="soft" size="xs">Edit</x-button></td>
            </tr>
            <tr class="border-t border-base-300 hover:bg-base-200/50">
                <td class="px-4 py-2 whitespace-nowrap">1002</td><td class="px-4 py-2 whitespace-nowrap">akari_y</td><td class="px-4 py-2 whitespace-nowrap">akari@example.com</td><td class="px-4 py-2 whitespace-nowrap">Sparrowhawk Labs</td><td class="px-4 py-2 whitespace-nowrap">Design</td><td class="px-4 py-2 whitespace-nowrap">Lead</td><td class="px-4 py-2 whitespace-nowrap">2024-09-15</td><td class="px-4 py-2 whitespace-nowrap">2026-05-13 08:11</td><td class="px-4 py-2 whitespace-nowrap">editor</td><td class="px-4 py-2 whitespace-nowrap">pro</td><td class="px-4 py-2 whitespace-nowrap">active</td>
                <td class="px-4 py-2 whitespace-nowrap"><x-button color="primary" appearance="soft" size="xs">Edit</x-button></td>
            </tr>
            <tr class="border-t border-base-300 hover:bg-base-200/50">
                <td class="px-4 py-2 whitespace-nowrap">1003</td><td class="px-4 py-2 whitespace-nowrap">kenji_o</td><td class="px-4 py-2 whitespace-nowrap">kenji@example.com</td><td class="px-4 py-2 whitespace-nowrap">Pinion Inc.</td><td class="px-4 py-2 whitespace-nowrap">Sales</td><td class="px-4 py-2 whitespace-nowrap">Manager</td><td class="px-4 py-2 whitespace-nowrap">2025-02-01</td><td class="px-4 py-2 whitespace-nowrap">2026-05-12 22:54</td><td class="px-4 py-2 whitespace-nowrap">editor</td><td class="px-4 py-2 whitespace-nowrap">pro</td><td class="px-4 py-2 whitespace-nowrap">invited</td>
                <td class="px-4 py-2 whitespace-nowrap"><x-button color="primary" appearance="soft" size="xs">Edit</x-button></td>
            </tr>
        </tbody>
    </table>
</x-table-scroll>
Loading…
Couldn't load the HTML

narrow table — no overflow, so neither the buttons nor the fade appear

ID Name Status
1Tanakaactive
2Yamadainactive
<x-table-scroll>
    <table class="w-full text-sm">
        <thead class="bg-base-200 text-base-content/70">
            <tr>
                <th class="px-4 py-2 text-left font-medium">ID</th>
                <th class="px-4 py-2 text-left font-medium">Name</th>
                <th class="px-4 py-2 text-left font-medium">Status</th>
            </tr>
        </thead>
        <tbody>
            <tr class="border-t border-base-300"><td class="px-4 py-2">1</td><td class="px-4 py-2">Tanaka</td><td class="px-4 py-2">active</td></tr>
            <tr class="border-t border-base-300"><td class="px-4 py-2">2</td><td class="px-4 py-2">Yamada</td><td class="px-4 py-2">inactive</td></tr>
        </tbody>
    </table>
</x-table-scroll>
Loading…
Couldn't load the HTML

card list — wide content other than a table (image strip / card row)

Item #1

A horizontally scrolled card list.

Item #2

A horizontally scrolled card list.

Item #3

A horizontally scrolled card list.

Item #4

A horizontally scrolled card list.

Item #5

A horizontally scrolled card list.

Item #6

A horizontally scrolled card list.

Item #7

A horizontally scrolled card list.

Item #8

A horizontally scrolled card list.

Item #9

A horizontally scrolled card list.

Item #10

A horizontally scrolled card list.

Item #11

A horizontally scrolled card list.

Item #12

A horizontally scrolled card list.

<x-table-scroll>
    <div class="flex gap-3 pb-2">
        @foreach(range(1, 12) as $i)
            <div class="shrink-0 w-48 rounded-[var(--radius-box)] border border-base-300 bg-base-100 p-lg">
                <div class="h-24 rounded-[var(--radius-field)] bg-gradient-to-br from-primary/30 via-secondary/30 to-accent/30 mb-3"></div>
                <p class="font-medium text-sm">Item #{{ $i }}</p>
                <p class="text-xs text-base-content/60 mt-1">A horizontally scrolled card list.</p>
            </div>
        @endforeach
    </div>
</x-table-scroll>
Loading…
Couldn't load the HTML

Want square buttons

ID Username Email Company Department Title Joined Role Plan Status
1001tatun55tatun@example.comYakaze Tech StudioDevelopmentCEO2024-04-01adminenterpriseactive
1002akari_yakari@example.comSparrowhawk LabsDesignLead2024-09-15editorproactive
<x-table-scroll button-style="flat">
    <table class="min-w-[1000px] w-full text-sm">
        <thead class="bg-base-200 text-base-content/70">
            <tr>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">ID</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Username</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Email</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Company</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Department</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Title</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Joined</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Role</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Plan</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Status</th>
            </tr>
        </thead>
        <tbody>
            <tr class="border-t border-base-300"><td class="px-4 py-2 whitespace-nowrap">1001</td><td class="px-4 py-2 whitespace-nowrap">tatun55</td><td class="px-4 py-2 whitespace-nowrap">tatun@example.com</td><td class="px-4 py-2 whitespace-nowrap">Yakaze Tech Studio</td><td class="px-4 py-2 whitespace-nowrap">Development</td><td class="px-4 py-2 whitespace-nowrap">CEO</td><td class="px-4 py-2 whitespace-nowrap">2024-04-01</td><td class="px-4 py-2 whitespace-nowrap">admin</td><td class="px-4 py-2 whitespace-nowrap">enterprise</td><td class="px-4 py-2 whitespace-nowrap">active</td></tr>
            <tr class="border-t border-base-300"><td class="px-4 py-2 whitespace-nowrap">1002</td><td class="px-4 py-2 whitespace-nowrap">akari_y</td><td class="px-4 py-2 whitespace-nowrap">akari@example.com</td><td class="px-4 py-2 whitespace-nowrap">Sparrowhawk Labs</td><td class="px-4 py-2 whitespace-nowrap">Design</td><td class="px-4 py-2 whitespace-nowrap">Lead</td><td class="px-4 py-2 whitespace-nowrap">2024-09-15</td><td class="px-4 py-2 whitespace-nowrap">editor</td><td class="px-4 py-2 whitespace-nowrap">pro</td><td class="px-4 py-2 whitespace-nowrap">active</td></tr>
        </tbody>
    </table>
</x-table-scroll>
Loading…
Couldn't load the HTML

Hide the buttons (native scroll only)

ID Username Email Company Department Title Joined Role Plan Status
1004misaki_tmisaki@example.comAnonymous Co.Customer SuccessStaff2025-07-10viewerfreeactive
1005ryouta_nryouta@example.comEarthsea LLCEngineeringSenior2023-11-20adminenterprisesuspended
<x-table-scroll :show-buttons="false">
    <table class="min-w-[1000px] w-full text-sm">
        <thead class="bg-base-200 text-base-content/70">
            <tr>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">ID</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Username</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Email</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Company</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Department</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Title</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Joined</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Role</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Plan</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Status</th>
            </tr>
        </thead>
        <tbody>
            <tr class="border-t border-base-300"><td class="px-4 py-2 whitespace-nowrap">1004</td><td class="px-4 py-2 whitespace-nowrap">misaki_t</td><td class="px-4 py-2 whitespace-nowrap">misaki@example.com</td><td class="px-4 py-2 whitespace-nowrap">Anonymous Co.</td><td class="px-4 py-2 whitespace-nowrap">Customer Success</td><td class="px-4 py-2 whitespace-nowrap">Staff</td><td class="px-4 py-2 whitespace-nowrap">2025-07-10</td><td class="px-4 py-2 whitespace-nowrap">viewer</td><td class="px-4 py-2 whitespace-nowrap">free</td><td class="px-4 py-2 whitespace-nowrap">active</td></tr>
            <tr class="border-t border-base-300"><td class="px-4 py-2 whitespace-nowrap">1005</td><td class="px-4 py-2 whitespace-nowrap">ryouta_n</td><td class="px-4 py-2 whitespace-nowrap">ryouta@example.com</td><td class="px-4 py-2 whitespace-nowrap">Earthsea LLC</td><td class="px-4 py-2 whitespace-nowrap">Engineering</td><td class="px-4 py-2 whitespace-nowrap">Senior</td><td class="px-4 py-2 whitespace-nowrap">2023-11-20</td><td class="px-4 py-2 whitespace-nowrap">admin</td><td class="px-4 py-2 whitespace-nowrap">enterprise</td><td class="px-4 py-2 whitespace-nowrap">suspended</td></tr>
        </tbody>
    </table>
</x-table-scroll>
Loading…
Couldn't load the HTML

Want to change the scroll amount (viewport ratio, default 0.6)

Column A Column B Column C Column D Column E Column F
One click scrolls 80% of the viewport widthbcdef
<x-table-scroll :scroll-amount="0.8">
    <table class="min-w-[1000px] w-full text-sm">
        <thead class="bg-base-200 text-base-content/70">
            <tr>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Column A</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Column B</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Column C</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Column D</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Column E</th>
                <th class="px-4 py-2 text-left font-medium whitespace-nowrap">Column F</th>
            </tr>
        </thead>
        <tbody>
            <tr class="border-t border-base-300"><td class="px-4 py-2 whitespace-nowrap">One click scrolls 80% of the viewport width</td><td class="px-4 py-2 whitespace-nowrap">b</td><td class="px-4 py-2 whitespace-nowrap">c</td><td class="px-4 py-2 whitespace-nowrap">d</td><td class="px-4 py-2 whitespace-nowrap">e</td><td class="px-4 py-2 whitespace-nowrap">f</td></tr>
        </tbody>
    </table>
</x-table-scroll>
Loading…
Couldn't load the HTML